irongit
reactxdjango/docker-compose.yml
35 lines756 BYAML
1services:
2 db:
3 container_name: db
4 volumes:
5 - ./db:/var/lib/popstgresql/data
6 environment:
7 - POSTGRES_DB=postgres
8 - POSTGRES_USER=postgres
9 - POSTGRES_PASSWORD=postgres
10 nginx:
11 image: nginx:1.22.1-alpine
12 container_name: nginx
13 ports:
14 - "80:80"
15 volumes:
16 - ./nginx/nginx.conf:/etc/nginx/nginx.conf
17 backend:
18 build: backend
19 command: python manage.py runserver 0:8000
20 volumes:
21 - ./backend:/backend
22 environment:
23 - POSTGRES_NAME=postgres
24 - POSTGRES_USER=postgres
25 - POSTGRES_PASSWORD=postgres
26 depends_on:
27 - db
28 frontend:
29 build: frontend
30 command: npm start
31 volumes:
32 - ./frontend:/frontend
33 depends_on:
34 - db
35 - backend