version: "3.8" services: app: build: . volumes: - "static:/app/static" - "media:/app/media" - ".:/app" depends_on: - db env_file: - env/app.env - env/db.env restart: always nginx: image: "nginx:latest" depends_on: - app ports: - "8000:80" volumes: - "static:/usr/share/nginx/html/static" - "media:/usr/share/nginx/html/media" - "./nginx.conf:/etc/nginx/conf.d/default.conf" restart: always db: image: "postgres:14-alpine" env_file: - env/db.env volumes: - "./db/postgres:/var/lib/postgresql/data" restart: always volumes: static: media: