Files
mediacms/docker-compose-dev.yaml
T

90 lines
2.2 KiB
YAML
Raw Normal View History

2021-07-01 20:35:43 +05:30
version: "3"
services:
2023-11-13 11:13:08 +02:00
migrations:
build:
context: .
2025-02-10 11:34:00 +02:00
dockerfile: ./Dockerfile
args:
- DEVELOPMENT_MODE=True
2023-11-13 11:13:08 +02:00
image: mediacms/mediacms-dev:latest
volumes:
- ./:/home/mediacms.io/mediacms/
2025-02-10 11:34:00 +02:00
command: "./deploy/docker/prestart.sh"
2023-11-13 11:13:08 +02:00
environment:
2025-02-10 11:34:00 +02:00
DEVELOPMENT_MODE: True
ENABLE_UWSGI: 'no'
ENABLE_NGINX: 'no'
ENABLE_CELERY_SHORT: 'no'
ENABLE_CELERY_LONG: 'no'
ENABLE_CELERY_BEAT: 'no'
ADMIN_USER: 'admin'
ADMIN_EMAIL: 'admin@localhost'
ADMIN_PASSWORD: 'admin'
2023-11-13 11:13:08 +02:00
restart: on-failure
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
2021-07-11 18:01:34 +03:00
frontend:
image: node:20
2021-07-11 18:01:34 +03:00
volumes:
- ${PWD}/frontend:/home/mediacms.io/mediacms/frontend/
working_dir: /home/mediacms.io/mediacms/frontend/
command: bash -c "npm install && npm run start"
env_file:
- ${PWD}/frontend/.env
ports:
- "8088:8088"
depends_on:
- web
2021-07-01 20:35:43 +05:30
web:
image: mediacms/mediacms-dev:latest
2023-11-13 11:13:08 +02:00
command: "python manage.py runserver 0.0.0.0:80"
2022-09-20 14:18:25 +02:00
environment:
2025-02-10 11:34:00 +02:00
DEVELOPMENT_MODE: True
2021-07-01 20:35:43 +05:30
ports:
- "80:80"
volumes:
- ./:/home/mediacms.io/mediacms/
depends_on:
2023-11-13 11:13:08 +02:00
- migrations
2021-07-01 20:35:43 +05:30
db:
2025-02-10 11:34:00 +02:00
image: postgres:17.2-alpine
2021-07-01 20:35:43 +05:30
volumes:
- ../postgres_data:/var/lib/postgresql/data/
restart: always
environment:
POSTGRES_USER: mediacms
POSTGRES_PASSWORD: mediacms
POSTGRES_DB: mediacms
2023-07-03 12:39:15 +02:00
TZ: Europe/London
2021-07-01 20:35:43 +05:30
healthcheck:
2024-09-20 11:52:50 +02:00
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}", "--host=db", "--dbname=$POSTGRES_DB", "--username=$POSTGRES_USER"]
2021-07-01 20:35:43 +05:30
interval: 10s
timeout: 5s
retries: 5
redis:
image: "redis:alpine"
restart: always
healthcheck:
2021-07-11 18:01:34 +03:00
test: ["CMD", "redis-cli", "ping"]
2021-07-01 20:35:43 +05:30
interval: 30s
timeout: 10s
2021-07-11 18:01:34 +03:00
retries: 3
2023-11-13 11:13:08 +02:00
celery_worker:
image: mediacms/mediacms-dev:latest
deploy:
replicas: 1
volumes:
- ./:/home/mediacms.io/mediacms/
environment:
ENABLE_UWSGI: 'no'
ENABLE_NGINX: 'no'
ENABLE_CELERY_BEAT: 'no'
ENABLE_MIGRATIONS: 'no'
2025-02-10 11:34:00 +02:00
DEVELOPMENT_MODE: True
2023-11-13 11:13:08 +02:00
depends_on:
- web