forked from AlmaLinux/albs-web-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
188 lines (173 loc) · 4.75 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
version: "3.9"
services:
db:
image: postgres:13
env_file:
- vars.env
environment:
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256 --encoding=UTF8 --locale=en_US.UTF-8 --data-checksums
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
ports:
- "5432:5432"
volumes:
- "./volumes/postgresql/data:/var/lib/postgresql/data"
rabbitmq:
image: rabbitmq:3.8-management
container_name: "rabbitmq-ts"
ports:
- "5672:5672"
- "15672:15672"
env_file:
- vars.env
restart: always
alts-celery:
image: alts-celery:latest
build:
dockerfile: Dockerfile.celery
context: ../alts
environment:
CELERY_CONFIG_PATH: "/celery_config.yaml"
EXTERNAL_NETWORK: "albs-web-server_default"
command: "bash -c 'source env/bin/activate && celery
-A alts.worker.app worker --pool=threads --concurrency=20
--loglevel=INFO -Q docker-x86_64-0 -O fair --without-gossip
--without-mingle --without-heartbeat'"
restart: on-failure
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../alts/configs/alts_config.yaml:/celery_config.yaml
depends_on:
- rabbitmq
alts-scheduler:
image: alts-scheduler:latest
build:
dockerfile: Dockerfile.scheduler
context: ../alts
ports:
- "8082:8000"
environment:
CELERY_CONFIG_PATH: "/scheduler_config.yaml"
SCHEDULER_CONFIG_PATH: "/scheduler_config.yaml"
command: "bash -c 'source env/bin/activate && uvicorn --host 0.0.0.0
alts.scheduler.app:app --limit-concurrency 100 --backlog 1000'"
restart: on-failure
volumes:
- ../alts/configs/alts_config.yaml:/scheduler_config.yaml
depends_on:
- rabbitmq
web_server:
image: al-web-server:latest
env_file:
- vars.env
ports:
- "8088:8000"
build:
dockerfile: Dockerfile
context: .
volumes:
- "./alws:/code/alws"
- "./scripts:/code/scripts"
- "./reference_data:/code/reference_data"
command:
bash -c 'source env/bin/activate &&
/wait_for_it.sh db:5432 &&
PYTHONPATH="." alembic --config alws/alembic.ini upgrade head &&
uvicorn --host 0.0.0.0 alws.app:app'
restart: on-failure
depends_on:
- db
- pulp
frontend:
image: albs-frontend:latest
env_file:
- vars.env
build:
dockerfile: Dockerfile
# TODO: Hack for developement, put https://github.com/AlmaLinux/albs-frontend here instead
context: ../albs-frontend
command: bash -c "npm install && npm run dev"
volumes:
- "../albs-frontend:/code"
restart: on-failure
depends_on:
- web_server
build_node:
image: albs-node:latest
privileged: true
env_file:
- vars.env
build:
# TODO: Hack for developement, put https://github.com/AlmaLinux/albs-node here instead
context: ../albs-node
dockerfile: Dockerfile
volumes:
# TODO: Hack for developement, put placeholder here instead
- "../albs-node/node-config:/home/alt/.config"
restart: on-failure
command: "bash -c '/wait_for_it.sh web_server:8000 && source env/bin/activate && ./almalinux_build_node.py -v -t 2'"
depends_on:
- web_server
sign_node:
image: sign-node:latest
env_file:
- vars.env
build:
context: ../albs-sign-node
dockerfile: Dockerfile
volumes:
# TODO: Hack for developement, put placeholder here instead
- "../albs-sign-node/node-config:/home/alt/.config"
- "~/.gnupg:/home/alt/.gnupg"
restart: on-failure
command: "bash -c '/wait_for_it.sh web_server:8000 && source env/bin/activate && ./almalinux_sign_node.py -v'"
gitea_listener:
image: albs-gitea-listener:latest
env_file:
- vars.env
build:
context: .
dockerfile: Dockerfile.gitea-listener
restart: on-failure
depends_on:
- mosquitto
git_cacher:
image: albs-git-cacher:latest
env_file:
- vars.env
build:
context: .
dockerfile: Dockerfile.git-cacher
restart: on-failure
depends_on:
- redis
pulp:
image: pulp/pulp
ports:
- 8081:80
volumes:
- "./volumes/pulp/settings:/etc/pulp"
- "./volumes/pulp/pulp_storage:/var/lib/pulp"
- "./volumes/pulp/pgsql:/var/lib/pgsql"
- "./volumes/pulp/containers:/var/lib/containers"
devices:
- "/dev/fuse"
restart: on-failure
mosquitto:
image: eclipse-mosquitto:2.0
ports:
- "11883:1883"
redis:
image: redis
ports:
- 6379:6379
restart: on-failure
nginx:
image: nginx
ports:
- 8080:80
volumes:
- "./nginx_configs:/etc/nginx/conf.d"
depends_on:
- web_server
- frontend