availabili.tf/docker-compose.yml

73 lines
1.5 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
depends_on:
- redis
# ETL job (runs with the same source as the backend)
celery-worker:
container_name: worker
command: celery -A make_celery.celery_app worker --loglevel=info --concurrency=1
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
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
volumes:
- ./availabili.tf:/app
networks:
- dev-network
# NGINX service
nginx:
image: nginx:latest
ports:
- "8000:80"
volumes:
- ./nginx:/etc/nginx/conf.d
depends_on:
- backend
- frontend
networks:
- dev-network
networks:
dev-network:
driver: bridge