Updated docker-compose and added testing init sql script
This commit is contained in:
		| @@ -1,11 +1,22 @@ | |||||||
| version: '3.3' | version: '3.8' | ||||||
| services: | services: | ||||||
|   db: |   postgres: | ||||||
|     image: postgres |     image: postgres | ||||||
|     restart: always |     restart: always | ||||||
|     environment: |     environment: | ||||||
|  |       POSTGRES_DB: postgres | ||||||
|       POSTGRES_USER: postgres |       POSTGRES_USER: postgres | ||||||
|       POSTGRES_PASSWORD: password |       POSTGRES_PASSWORD: postgres | ||||||
|     ports: |     ports: | ||||||
|       - '5432:5432' |       - '5432:5432' | ||||||
|  |     volumes: | ||||||
|  |       - ./init.sql:/docker-entrypoint-initdb.d/init.sql | ||||||
|  |       - /home/WordAXDB/data:/var/lib/postgresql/data | ||||||
|  |  | ||||||
|  |   init-db: | ||||||
|  |     image: postgres | ||||||
|  |     depends_on: | ||||||
|  |       - postgres | ||||||
|  |     volumes: | ||||||
|  |       - ./init-scripts:/docker-entrypoint-initdb.d | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								WordAX/init-scripts/init.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								WordAX/init-scripts/init.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | CREATE TABLE example_table ( | ||||||
|  |     id SERIAL PRIMARY KEY, | ||||||
|  |     name VARCHAR(255), | ||||||
|  |     description TEXT | ||||||
|  | );; | ||||||
		Reference in New Issue
	
	Block a user