41 lines
848 B
YAML
41 lines
848 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
backend:
|
|
build: ./backend
|
|
container_name: parcel-backend
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- FLASK_ENV=development
|
|
- FLASK_DEBUG=true
|
|
- PYTHONUNBUFFERED=1
|
|
- LOG_LEVEL=DEBUG
|
|
volumes:
|
|
- ./backend:/app
|
|
networks:
|
|
- parcel-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/health').read()"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
container_name: parcel-frontend
|
|
ports:
|
|
- "8080:80"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
networks:
|
|
- parcel-network
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
parcel-network:
|
|
driver: bridge
|