-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
96 lines (89 loc) · 1.95 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3.7"
services:
postgresql:
image: postgres:12-alpine
environment:
POSTGRES_USER: rola
POSTGRES_DB: rola
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- "postgres_data:/var/lib/postgresql/data"
# Create another user to support rumming Rolca's tests.
- "./docker/postgres/init:/docker-entrypoint-initdb.d/"
networks:
- internal
expose:
- "5432"
ports:
- "5432:5432"
redis:
image: redis:5-alpine
volumes:
- "redis_data:/data"
networks:
- internal
expose:
- "6379"
ports:
- "6379:6379"
django:
image: rolca/rola
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgresql
- redis
volumes:
- ".:/app"
- "django_media:/storage/media"
env_file: .env
entrypoint: ["./manage.py"]
command: ["runserver", "0.0.0.0:8000"]
networks:
- internal
expose:
- "8000"
frontend:
image: rolca/frontend
build:
context: frontend
dockerfile: Dockerfile
target: installer
volumes:
- "./frontend:/node/app"
# Shade mounted modules to force node to use ones from the parent dir.
- "empty:/node/app/node_modules"
environment:
# Detecting file system changes on bind mounts sometimes doesn't work
# by default: https://github.com/paulmillr/chokidar
CHOKIDAR_USEPOLLING: "true"
# react-sctripts exit immediately if stdin is not attached.
stdin_open: true
entrypoint: ["react-scripts"]
command: ["start"]
networks:
- internal
expose:
- "3000"
nginx:
image: rolca/nginx
build:
context: docker/nginx
dockerfile: Dockerfile
depends_on:
- django
- frontend
volumes:
- "django_media:/storage/media"
networks:
- internal
ports:
- "8080:80"
volumes:
postgres_data:
redis_data:
empty:
django_media:
networks:
internal: