Repository navigation
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
150 lines (138 loc) · 2.83 KB
/
Copy pathcompose.dev.yml
File metadata and controls
150 lines (138 loc) · 2.83 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: snommoc
volumes:
postgres_snommoc:
name: postgres_snommoc
x-volume-django-manage: &volume-django-manage
type: bind
source: ./backend
target: /django
x-volume-logs: &volume-logs
type: bind
source: ./runtime-dev/log
target: /var/log/snommoc
x-volume-static: &volume-static
type: bind
source: ./runtime-dev/static
target: /var/www/static
x-volume-media: &volume-media
type: bind
source: ./runtime-dev/media
target: /var/www/media
x-common: &common
env_file:
- ".env.dev"
restart: unless-stopped
x-watch-django: &watch-django
watch:
- action: sync
path: ./backend
target: /django
ignore:
- env/
- __pycache__/
- action: rebuild
path: ./backend/requirements.txt
services:
postgres:
<<: *common
extends:
file: ./compose.common.yml
service: postgres
container_name: snommoc_postgres_dev
redis:
<<: *common
extends:
file: ./compose.common.yml
service: redis
ports:
- "6379:6379"
django: &django
<<: *common
build:
target: dev_django
extends:
file: ./compose.common.yml
service: django
depends_on:
postgres:
condition: service_healthy
ports:
- "8000:8000"
volumes:
- <<: *volume-logs
- <<: *volume-media
- <<: *volume-static
develop:
<<: *watch-django
django_manage:
<<: *django
profiles:
- "manage"
ports: []
healthcheck:
test: ["NONE"]
entrypoint: ["sh"]
volumes:
- <<: *volume-django-manage
- <<: *volume-logs
- <<: *volume-media
- <<: *volume-static
next: &next
<<: *common
build:
target: dev_nextjs
extends:
file: ./compose.common.yml
service: next
container_name: snommoc_next
depends_on:
django:
condition: service_healthy
ports:
- "3000:3000"
develop:
watch:
- action: sync
path: ./frontend
target: /app
ignore:
- node_modules/
- action: rebuild
path: ./frontend/package.json
next_manage:
<<: *next
profiles:
- "manage"
container_name: snommoc_next_manage
ports: []
entrypoint: "npm run test"
nginx:
<<: *common
build:
target: dev_nginx
extends:
file: compose.common.yml
service: nginx
depends_on:
django:
condition: service_healthy
next:
condition: service_healthy
ports:
- "81:80"
volumes:
- <<: *volume-media
- <<: *volume-static
celery:
<<: *common
build:
target: dev_celery
depends_on:
redis:
condition: service_healthy
volumes:
- <<: *volume-logs
- <<: *volume-media
- <<: *volume-static
develop:
<<: *watch-django