-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
63 lines (62 loc) · 1.34 KB
/
docker-compose-dev.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: "3"
services:
db:
image: postgres:buster
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./postgres_data/db:/var/lib/postgresql/data
ports:
- "5432:5432"
api:
restart: on-failure
build:
context: ./coursebackend
dockerfile: Dockerfile.dev
command: sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- ./coursebackend:/app
ports:
- 8000:8000
environment:
- DB_HOST=db
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASS=postgres
- CACHE_HOST=memcached:11211
- SECRET_KEY=devsecretkey
- DEBUG=1
depends_on:
- db
- memcached
frontend:
build:
dockerfile: Dockerfile.dev
context: ./frontend
environment:
CHOKIDAR_USEPOLLING: "true"
volumes:
- /app/node_modules
- ./frontend:/app
nginx:
restart: always
build:
dockerfile: Dockerfile.dev
context: ./nginx
volumes:
- ./nginx/dev:/etc/nginx/conf.d
ports:
- "5000:80"
depends_on:
- api
- frontend
memcached:
image: bitnami/memcached:latest
ports:
- "11211:11211"
expose:
- "11211"