services: db: image: postgres:17.6 restart: always volumes: - ./data/db:/var/lib/postgresql/data environment: - POSTGRES_DB=postgres - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres cache: image: redis:7.2.4 restart: always volumes: - ./data/cache:/data web: build: . command: [ "./wait-for-it.sh", "db:5432", "--", "uwsgi", "--ini", "/code/config/uwsgi/uwsgi.ini", ] restart: always volumes: - .:/code ports: - "8000:8000" environment: - DJANGO_SETTINGS_MODULE=educa.settings.prod - POSTGRES_DB=postgres - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres depends_on: - db - cache nginx: image: nginx:1.25.5 restart: always volumes: - ./config/nginx:/etc/nginx/templates - .:/code ports: - "80:80" # http - "443:443" # https daphne: build: . working_dir: /code/ command: [ "./wait-for-it.sh", "db:5432", "--", "daphne", "-b", # bind "0.0.0.0", # to all available network interfaces "-p", "9001", "educa.asgi:application", ] restart: always volumes: - .:/code environment: - DJANGO_SETTINGS_MODULE=educa.settings.prod - POSTGRES_DB=postgres - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres depends_on: - db - cache