forked from resource-hub-dev/rhub-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
79 lines (73 loc) · 2.12 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
version: '3.9'
networks:
default:
name: rhub-development
services:
rhub-api:
build:
context: .
image: quay.io/resource-hub-dev/rhub-api
command: rhub-api
volumes: &rhub-api-volumes
- .:/opt/app-root/src/rhub_api/:delegated,z
- ./data/bare_metal_logs/:/srv/bare_metal_logs/:delegated,z
- ./data/vault.yml:/srv/vault.yml:delegated,z
- ./data/vault-data.yml:/srv/vault-data.yml:delegated,z
environment: &rhub-api-environment
FLASK_APP: ${FLASK_APP:-rhub.api:create_app()}
FLASK_ENV: ${FLASK_ENV:-development}
FLASK_RUN_HOST: ${FLASK_RUN_HOST:-0.0.0.0}
FLASK_RUN_PORT: ${FLASK_RUN_PORT:-8081}
RHUB_SKIP_INIT: ${RHUB_SKIP_INIT:-False}
RHUB_RETURN_INITIAL_FLASK_APP: ${RHUB_RETURN_INITIAL_FLASK_APP:-False}
REQUESTS_CA_BUNDLE: /etc/pki/tls/certs/ca-bundle.crt
env_file:
- .env
ports:
- "8081:8081"
rhub-worker:
build:
context: .
image: quay.io/resource-hub-dev/rhub-api
command: rhub-worker
volumes: *rhub-api-volumes
environment: *rhub-api-environment
env_file:
- .env
healthcheck:
test: [ "CMD", "./bin/healthcheck.sh", "rhub-worker" ]
interval: 30s
retries: 5
timeout: 30s
postgres:
image: postgres:${RHUB_IMAGE_POSTGRES_VERSION:-13}
env_file:
- .env
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./bin/setup_postgres.sh:/docker-entrypoint-initdb.d/setup_postgres.sh:delegated,z
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 10s
retries: 5
timeout: 5s
broker:
image: rabbitmq:${RHUB_IMAGE_RABBITMQ_VERSION:-3}
env_file:
- .env
ports:
- '5672:5672'
- '15672:15672' # web UI
- '15674:15674' #webstomp
healthcheck:
test: [ "CMD", "rabbitmq-diagnostics", "-q", "ping" ]
interval: 30s
retries: 5
timeout: 30s
volumes:
- ./config/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- ./config/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins:ro
volumes:
postgres_data: