Files
OutFleet/docker-compose.yaml

96 lines
2.2 KiB
YAML
Raw Normal View History

2025-01-09 16:37:09 +00:00
services:
web_ui:
2025-01-09 17:24:12 +00:00
#image: ultradesu/outfleet:v2
image: outfleet:local
2025-01-09 16:37:09 +00:00
container_name: outfleet-web
build:
context: .
ports:
- "8000:8000"
environment:
- POSTGRES_HOST=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
2025-01-09 17:24:12 +00:00
- EXTERNAL_ADDRESS=http://127.0.0.1:8000
2025-01-09 16:37:09 +00:00
- CELERY_BROKER_URL=redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: >
sh -c "sleep 3 &&
python manage.py makemigrations vpn &&
python manage.py migrate &&
python manage.py create_admin &&
python manage.py runserver 0.0.0.0:8000"
worker:
2025-03-13 01:43:33 +02:00
image: outfleet:local
2025-01-09 16:37:09 +00:00
container_name: outfleet-worker
2025-01-09 17:24:12 +00:00
# volumes:
# - .:/app
2025-01-09 16:37:09 +00:00
build:
context: .
environment:
- POSTGRES_HOST=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- CELERY_BROKER_URL=redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: >
sh -c "sleep 3 && celery -A mysite worker"
beat:
2025-03-13 01:43:33 +02:00
image: outfleet:local
2025-01-09 16:37:09 +00:00
container_name: outfleet-beat
2025-01-09 17:24:12 +00:00
# volumes:
# - .:/app
2025-01-09 16:37:09 +00:00
build:
context: .
environment:
- POSTGRES_HOST=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- CELERY_BROKER_URL=redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: >
sh -c "sleep 3 && celery -A mysite beat"
postgres:
image: postgres:15
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: outfleet
ports:
- "5432:5432"
2025-01-09 17:24:12 +00:00
volumes:
- postgres_data:/var/lib/postgresql/data
2025-01-09 16:37:09 +00:00
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7
container_name: redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
volumes:
postgres_data: