-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (45 loc) · 948 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: '3.8'
name: food
volumes:
fg_data:
static_fg:
media_fg:
services:
db:
image: postgres:13
env_file: .env
volumes:
- fg_data:/var/lib/postgresql/fg_data
backend:
build:
context: ./backend
dockerfile: Dockerfile
# restart: always
env_file: .env
depends_on:
- db
volumes:
- static_fg:/backend_static
- media_fg:/app/media
# - ./backend/foodgram:/app/foodgram
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend/:/app/result_build/
depends_on:
- db
- backend
nginx:
image: nginx:1.19.3
ports:
- "8000:80"
volumes:
- ./infra/nginx.conf:/etc/nginx/conf.d/default.conf
- ./frontend/build:/usr/share/nginx/html/
- ./docs/:/usr/share/nginx/html/api/docs/
- static_fg:/staticfiles/
- media_fg:/app/media/
depends_on:
- backend