This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
125 lines (102 loc) · 2.31 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
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
version: '3.8'
services:
# Web instance will run in a separate container and should establish
# connections to Redis and the backend DB while running.
web-django:
build:
context: ./
dockerfile: ./compose/local/django/Dockerfile
image: web_mastf_django
command: /start
env_file:
- ./.env
volumes:
- storage_data:/app_storage
expose:
- 8000
depends_on:
- redis
- backend-db
networks:
- frontend
- backend
# The backend database will be used to store all relevant data. There
# should be only one backend-db container running as it would result
# in data inconsistencies.
backend-db:
image: postgres:13.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env
networks:
- backend
redis:
image: redis:7-alpine
networks:
- backend
celery_worker:
build:
context: ./
args:
- ANDROID_SEMGREP_COMMIT_SHA=22caac9709f8915262be9af0548b3b1c478b560d
dockerfile: ./compose/local/django/celery/Dockerfile
image: mastf_celery_worker
command: /start_celery_worker
env_file:
- ./.env
volumes:
- storage_data:/app_storage
depends_on:
- redis
- backend-db
networks:
- backend
# This container is optional and can be used to register scheduled tasks
# that execute whithin a specific timeframe.
celery_beat:
build:
context: ./
dockerfile: ./compose/local/django/celery/Dockerfile
image: mastf_celery_beat
command: /start_celery_beat
env_file:
- ./.env
volumes:
- storage_data:/app_storage
depends_on:
- redis
- backend-db
networks:
- backend
# Our reverse proxy for handling requests (and serving static files)
nginx:
build: ./compose/local/nginx/
ports:
- 8080:80
- 8443:443
env_file:
- ./.env
environment:
NGINX_ENVSUBST_TEMPLATE_SUFFIX: ".conf"
depends_on:
- web-django
networks:
- frontend
# Swift server
swiftsrv:
build:
context: ./
dockerfile: ./compose/local/swiftsrv/Dockerfile
expose:
- 1289
env_file:
- ./.env
networks:
- backend
volumes:
postgres_data: {}
storage_data: {}
networks:
frontend:
backend: