mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-07-06 17:14:07 +00:00
98 lines
2.3 KiB
YAML
98 lines
2.3 KiB
YAML
services:
|
|
web_ui:
|
|
#image: ultradesu/outfleet:v2
|
|
image: outfleet:local
|
|
container_name: outfleet-web
|
|
# volumes:
|
|
# - .:/app
|
|
build:
|
|
context: .
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- POSTGRES_HOST=postgres
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- EXTERNAL_ADDRESS=http://127.0.0.1:8000
|
|
- 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:
|
|
image: ultradesu/outfleet:v2
|
|
container_name: outfleet-worker
|
|
# volumes:
|
|
# - .:/app
|
|
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:
|
|
image: ultradesu/outfleet:v2
|
|
container_name: outfleet-beat
|
|
# volumes:
|
|
# - .:/app
|
|
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"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
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:
|