Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.1 kB
1
Indexable
Never
---
version: '3.3'
services:

  frontend:
    container_name: foodgram-front
    # image: xewus/foodgram_front:latest
    build: ../frontend
    volumes:
      - ./frontend/:/app/result_build/

  db:
    container_name: foodgram-db
    image: postgres:13.0-alpine
    restart: always
    volumes:
      - postgres_data:/var/lib/postgresql/data/
    env_file:
      - ../.env

  backend:
    container_name: foodgram-app
    # image: xewus/foodgram_back:latest
    build: ../backend
    restart: always
    volumes:
      - static_dir:/app/static/
      - media_dir:/app/media/
    env_file:
      - ../.env

  nginx:
    container_name: foodgram-proxy
    image: nginx:1.23.3-alpine
    restart: always
    ports:
      # - 8001:80
      - 80:80
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
      - ./frontend/build:/usr/share/nginx/html/
      - ./docs/:/usr/share/nginx/html/api/docs/
      - static_dir:/etc/nginx/html/static/
      - media_dir:/etc/nginx/html/media/
    depends_on:
      - backend
      - frontend

volumes:
  static_dir:
  media_dir:
  postgres_data:
...
Leave a Comment