37 lines
		
	
	
		
			852 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			852 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| services:
 | |
|   api:
 | |
|     image: prtsie/schengen-visa
 | |
|     container_name: visa-api
 | |
|     ports:
 | |
|       - "5000:5000"
 | |
|     depends_on:
 | |
|       postgres-db:
 | |
|         condition: service_healthy
 | |
|     environment:
 | |
|       - ASPNETCORE_ENVIRONMENT=Development
 | |
|       - ConnectionStrings__connectionString=Host=postgres-db;Port=5432;Database=visa;Username=postgres;Password=Qwerty123456!
 | |
|     networks:
 | |
|       - app-network
 | |
| 
 | |
|   postgres-db:
 | |
|     image: postgres:latest
 | |
|     container_name: visa-db
 | |
|     environment:
 | |
|       POSTGRES_USER: postgres
 | |
|       POSTGRES_PASSWORD: Qwerty123456!
 | |
|       POSTGRES_DATABASE: visa
 | |
|     ports:
 | |
|       - "5433:5432"
 | |
|     networks:
 | |
|       - app-network
 | |
|     healthcheck:
 | |
|       test: ["CMD-SHELL", "pg_isready -U postgres -d visa"]
 | |
|       interval: 5s
 | |
|       timeout: 5s
 | |
|       retries: 10
 | |
|       start_period: 10s
 | |
| 
 | |
| networks:
 | |
|   app-network:
 | |
|     driver: bridge
 |