availabili.tf/docker-compose.yml

77 lines
1.6 KiB
YAML
Raw Normal View History

version: '3.9'
2024-10-23 16:14:47 -07:00
services:
# Flask service
2024-10-23 16:14:47 -07:00
backend:
container_name: backend
2024-12-09 17:03:43 -08:00
image: backend-flask
build:
context: ./backend-flask
2024-10-23 16:14:47 -07:00
volumes:
- ./backend-flask:/app
networks:
- dev-network
2024-12-09 17:03:43 -08:00
environment:
- FLASK_DEBUG=1
- FLASK_CELERY_BROKER_URL=redis://redis:6379/0
- FLASK_CELERY_RESULT_BACKEND=redis://redis:6379/0
2024-12-10 18:18:40 -08:00
- DATABASE_URI=sqlite:///db.sqlite3
2024-12-09 17:03:43 -08:00
depends_on:
- redis
# ETL job (runs with the same source as the backend)
celery-worker:
container_name: worker
2024-12-11 18:04:53 -08:00
command: celery -A make_celery.celery_app worker --loglevel=info --concurrency=1 -B
2024-12-09 17:03:43 -08:00
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
2024-12-10 18:18:40 -08:00
- DATABASE_URI=sqlite:///db.sqlite3
2024-12-09 17:03:43 -08:00
image: backend-flask
volumes:
- ./backend-flask:/app
networks:
- dev-network
depends_on:
- redis
# message broker
redis:
image: redis:alpine
container_name: redis
networks:
- dev-network
ports:
- 6379:6379
# Vue + Vite service
frontend:
container_name: frontend
build:
context: ./availabili.tf
2024-10-23 16:14:47 -07:00
environment:
VITE_API_URL: http://localhost:8000 # API endpoint
2024-12-11 17:20:04 -08:00
ports:
- 5173:5173
volumes:
- ./availabili.tf:/app
networks:
- dev-network
# NGINX service
nginx:
image: nginx:latest
ports:
- "8000:80"
volumes:
2024-12-11 17:20:04 -08:00
- ./nginx/development.conf:/etc/nginx/nginx.conf
depends_on:
- backend
- frontend
networks:
- dev-network
networks:
dev-network:
driver: bridge