-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathcompose.base.yml
More file actions
104 lines (102 loc) · 2.94 KB
/
compose.base.yml
File metadata and controls
104 lines (102 loc) · 2.94 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
x-api: &default-api
image: ghcr.io/openimis/openimis-be:${BE_TAG:-develop}
environment:
- DB_DEFAULT=${DB_DEFAULT:-postgresql}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- SECRET_KEY=${SECRET_KEY}
- SITE_ROOT=api
- SITE_URL=${DOMAIN}
- CELERY_BROKER_URL=amqp://rabbitmq
- MODE=${MODE:-Prod}
- HOSTS=${HOSTS}
- CACHE_BACKEND=${CACHE_BACKEND}
- CACHE_URL=${CACHE_URL}
- CACHE_OPTIONS=${CACHE_OPTIONS}
- OPENSEARCH_ADMIN=${OPENSEARCH_ADMIN}
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- OPENSEARCH_HOSTS=${OPENSEARCH_HOSTS}
volumes:
- photos:/openimis-be/openIMIS/images/insurees
depends_on:
db:
condition: service_healthy
networks:
openimis-net:
services:
frontend:
image: ghcr.io/openimis/openimis-fe:${FE_TAG:-develop}
restart: always
environment:
- REACT_APP_SENTRY_DSN=${REACT_APP_SENTRY_DSN}
- REACT_APP_API_URL=api
- NEW_OPENIMIS_HOST=${DOMAIN}
- OPENIMIS_CONF_JSON=${OPENIMIS_FE_CONF_JSON}
- OPENSEARCH_BASIC_TOKEN=${OPENSEARCH_BASIC_TOKEN}
networks:
openimis-net:
# proxy:
ports:
- ${HTTP_PORT:-80}:80
- ${HTTPS_PORT:-443}:443
depends_on:
- backend
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
# comment the following line if you are using your own gateway
- ./conf/nginx:/conf/
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.frontend.entrypoints=websecure"
- "traefik.http.routers.frontend.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.frontend.tls=true"
- "traefik.http.routers.frontend.tls.certresolver=letsencrypt"
- "traefik.http.services.frontend.loadbalancer.server.port=80"
# Optional: Redirect HTTP to HTTPS
- "traefik.http.routers.frontend-http.entrypoints=web"
- "traefik.http.routers.frontend-http.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.frontend-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
migrations:
<<: *default-api
command: init
restart: no
backend:
<<: *default-api
command: start
restart: always
depends_on:
migrations:
condition: service_completed_successfully
redis:
condition: service_healthy
worker:
<<: *default-api
command: worker
restart: always
depends_on:
migrations:
condition: service_completed_successfully
redis:
condition: service_healthy
deploy:
mode: replicated
replicas: ${WORKER_REPLICAS:-3}
rabbitmq:
image: rabbitmq:3-management
restart: always
networks:
openimis-net:
networks:
# proxy:
# external: true
openimis-net:
name: "${PROJECT_NAME:-openimis}-net"
volumes:
database:
photos: