Docker support, changed DB scheme
This commit is contained in:
		
							parent
							
								
									60c6f318d6
								
							
						
					
					
						commit
						848b61108e
					
				| @ -1,5 +1,5 @@ | |||||||
| FROM eclipse-temurin:21 | FROM eclipse-temurin:21 | ||||||
| LABEL authors="indx" | LABEL authors="indx" | ||||||
| 
 | 
 | ||||||
| COPY ./build/libs/NTO-Finals-0.0.1-SNAPSHOT.jar /opt/app/ | COPY ./build/libs/S-QR-Backend-0.0.1-SNAPSHOT.jar /opt/app/ | ||||||
| CMD ["java", "-jar", "/opt/app/NTO-Finals-0.0.1-SNAPSHOT.jar"] | CMD ["java", "-jar", "/opt/app/S-QR-Backend-0.0.1-SNAPSHOT.jar"] | ||||||
| @ -1,18 +1,18 @@ | |||||||
| services: | services: | ||||||
| #  app: |   app: | ||||||
| #    build: |     build: | ||||||
| #      context: ../ |       context: ../ | ||||||
| #      dockerfile: ./docker/Dockerfile |       dockerfile: ./docker/Dockerfile | ||||||
| #    container_name: app |     container_name: app | ||||||
| #    depends_on: |     depends_on: | ||||||
| #      - postgres_nto |       - postgres_nto | ||||||
| #    environment: |     environment: | ||||||
| #      - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres_nto:5432/application_db |       - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres_nto:5432/application_db | ||||||
| #      - SPRING_DATASOURCE_USERNAME=$USERNAME |       - SPRING_DATASOURCE_USERNAME=indexzero | ||||||
| #      - SPRING_DATASOURCE_PASSWORD=$PASSWORD |       - SPRING_DATASOURCE_PASSWORD=gkl370WVUPMgLhK | ||||||
| # | 
 | ||||||
| #    ports: |     ports: | ||||||
| #      - "8081:8081" |       - "8081:8080" | ||||||
| 
 | 
 | ||||||
|   postgres_nto: |   postgres_nto: | ||||||
|     image: postgres:latest |     image: postgres:latest | ||||||
|  | |||||||
| @ -11,4 +11,5 @@ public class EntranceDTO { | |||||||
|     private LocalDateTime entryTime; |     private LocalDateTime entryTime; | ||||||
|     private String readerName; |     private String readerName; | ||||||
|     private String type; |     private String type; | ||||||
|  |     private String entryType; | ||||||
| } | } | ||||||
|  | |||||||
| @ -22,4 +22,7 @@ public class Code { | |||||||
| 
 | 
 | ||||||
|     @Column(name = "name") |     @Column(name = "name") | ||||||
|     String name; |     String name; | ||||||
|  | 
 | ||||||
|  |     @Column(name = "entry_type") | ||||||
|  |     String entryType; | ||||||
| } | } | ||||||
|  | |||||||
| @ -13,6 +13,7 @@ public class EntranceMapper { | |||||||
|         entranceDTO.setEmployeeLogin(entrance.getEmployee().getLogin()); |         entranceDTO.setEmployeeLogin(entrance.getEmployee().getLogin()); | ||||||
|         entranceDTO.setEntryTime(entrance.getVisitTime()); |         entranceDTO.setEntryTime(entrance.getVisitTime()); | ||||||
|         entranceDTO.setReaderName(entrance.getReader().getName()); |         entranceDTO.setReaderName(entrance.getReader().getName()); | ||||||
|  |         entranceDTO.setEntryType(entrance.getReader().getEntryType()); | ||||||
|         entranceDTO.setType(entrance.getType()); |         entranceDTO.setType(entrance.getType()); | ||||||
| 
 | 
 | ||||||
|         return entranceDTO; |         return entranceDTO; | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ spring: | |||||||
|     name: NTO-Finals |     name: NTO-Finals | ||||||
| 
 | 
 | ||||||
|   datasource: |   datasource: | ||||||
|  |     # INFO: Comment url, username and password for usage with docker | ||||||
|     url: jdbc:postgresql://localhost:5432/application_db |     url: jdbc:postgresql://localhost:5432/application_db | ||||||
|     username: indexzero |     username: indexzero | ||||||
|     password: gkl370WVUPMgLhK |     password: gkl370WVUPMgLhK | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ | |||||||
|                    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd |                    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd | ||||||
|         http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> |         http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> | ||||||
| 
 | 
 | ||||||
|     <changeSet id="2024-10-20--0001-code" author="anepretimov"> |     <changeSet id="2024-10-20--0001-code-03" author="anepretimov"> | ||||||
| 
 | 
 | ||||||
|         <preConditions onFail="MARK_RAN"> |         <preConditions onFail="MARK_RAN"> | ||||||
|             <not> |             <not> | ||||||
| @ -27,6 +27,11 @@ | |||||||
|             <column name="name" type="VARCHAR(200)"> |             <column name="name" type="VARCHAR(200)"> | ||||||
|                 <constraints nullable="false"/> |                 <constraints nullable="false"/> | ||||||
|             </column> |             </column> | ||||||
|  | 
 | ||||||
|  |             <column name="entry_type" type="VARCHAR(200)"> | ||||||
|  |                 <constraints nullable="false"/> | ||||||
|  |             </column> | ||||||
|  | 
 | ||||||
|         </createTable> |         </createTable> | ||||||
| 
 | 
 | ||||||
|     </changeSet> |     </changeSet> | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ | |||||||
|                    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd |                    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd | ||||||
|         http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> |         http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> | ||||||
| 
 | 
 | ||||||
|     <changeSet id="2024-10-20--0001-code-data" author="anepretimov"> |     <changeSet id="2024-10-20--0001-code-data-02" author="anepretimov"> | ||||||
|         <loadData tableName="code" file="db.changelog/data/csv/2024-10-20--0001-code-data.csv" |         <loadData tableName="code" file="db.changelog/data/csv/2024-10-20--0001-code-data.csv" | ||||||
|                   separator=";" |                   separator=";" | ||||||
|                   quotchar='"' |                   quotchar='"' | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| id;value;name | id;value;name;entry_type | ||||||
| 1;1234567890123456789;Главный Вход | 1;1234567890123456789;Главный Вход;Вход | ||||||
| 2;9223372036854775807;Задний Вход | 2;9223372036854775807;Главный Выход;Выход | ||||||
| 3;1122334455667788990;Вход с парковки | 3;1122334455667788990;Задний вход;Вход | ||||||
| 4;998877665544332211;Вход с улицы Колатушкина | 4;998877665544332211;Выход с парковки;Выход | ||||||
| 5;5566778899001122334;Вход с улицы Пушкина | 5;5566778899001122334;Вход с улицы Пушкина;Вход | ||||||
| 
 | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user