-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.prod.yml
180 lines (169 loc) · 4.65 KB
/
docker-compose.prod.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
version: '3.5'
x-cache:
&cache
cache_from:
- ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-php
- ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-nginx
services:
# gateway-frontend:
# &gateway-frontend
# image: ghcr.io/conductionnl/commonground-gateway-frontend:latest
# depends_on:
# - php
# ports:
# - "83:80"
php:
&php
image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-php:${APP_ENV}
build:
context: ./api
target: api_platform_php
<<: *cache
depends_on:
- db
volumes:
- ./api:/srv/api:rw,cached
- ./api/var/certs:/var/certs:rw,cached
- ./gateway:/srv/api/fixtures:rw,cached
environment:
- CONTAINER_REGISTRY_BASE=${CONTAINER_REGISTRY_BASE}
- CONTAINER_PROJECT_NAME=${CONTAINER_PROJECT_NAME}
- DATABASE_URL=postgres://api-platform:!ChangeMe!@db/api?serverVersion=10.1
# - DATABASE_URL=mysql://api-platform:!ChangeMe!@db/api?serverVersion=10.1
- APP_ENV=${APP_ENV}
- APP_CONTAINER=${APP_CONTAINER}
- APP_DEBUG=${APP_DEBUG}
- APP_CACHE=${APP_CACHE}
- APP_VERSION=${APP_VERSION}
- APP_NAME=${APP_NAME}
- APP_NAME_TECHNICAL=${APP_NAME_TECHNICAL}
- APP_DOMAIN=${APP_DOMAIN}
- APP_SUBDOMAIN=${APP_SUBDOMAIN}
- APP_SUBPATH=${APP_SUBPATH}
- APP_SUBPATH_ROUTING=${APP_SUBPATH_ROUTING}
- APP_DEMO=${APP_DEMO}
- APP_REPRO=${APP_REPRO}
- APP_DESCRIPTION=${APP_DESCRIPTION}
- APP_LOGO=${APP_LOGO}
- APP_HOME=${APP_HOME}
- APP_COMMONGROUND_ID=${APP_COMMONGROUND_ID}
- APP_APPLICATION_KEY=${APP_APPLICATION_KEY}
- APP_BUILD_ALL_FIXTURES=${APP_BUILD_ALL_FIXTURES}
- APP_WEB=${APP_WEB}
- BADGES=${BADGES}
- APP_BUILD=${APP_BUILD}
- APP_INTERNAL=${APP_INTERNAL}
- GLOBAL_DOMAIN=${GLOBAL_DOMAIN}
- APP_URL=${APP_URL}
- APP_CHART=${APP_CHART}
- HELM_REPOSITORY=${HELM_REPOSITORY}
- ARTIFACTHUB_ID=${ARTIFACTHUB_ID}
- ARTIFACTHUB_USER=${ARTIFACTHUB_USER}
- OWNER_NAME=${OWNER_NAME}
- OWNER_URL=${OWNER_URL}
- APP_SESSION_DURATION=${APP_SESSION_DURATION}
- LICENCE_NAME=${LICENCE_NAME}
- TRUSTED_PROXIES=${TRUSTED_PROXIES}
- TRUSTED_HOSTS=${TRUSTED_HOSTS}
- AUTH_ENABLED=${AUTH_ENABLED}
- AUDITTRAIL_ENABLED=${AUDITTRAIL_ENABLED}
- NOTIFICATION_ENABLED=${NOTIFICATION_ENABLED}
- REDIS_HOST=redis
- REDIS_PORT=6379
- APP_AUTH=${APP_AUTH}
- GITHUB_KEY=${GITHUB_KEY}
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=${RABBITMQ_USERNAME}
- RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}
- READ_ONLY=true
- CRON_RUNNER_ENABLED=${CRON_RUNNER_ENABLED}
- CRON_RUNNER_CRONTAB=${CRON_RUNNER_CRONTAB}
- CRON_RUNNER_CONCURRENCY_POLICY=${CRON_RUNNER_CONCURRENCY_POLICY}
ports:
- "82:80"
cap_drop:
- ALL
security_opt:
- no-new-privileges
read_only: true
tmpfs:
- /tmp:uid=101,gid=101
api:
&nginx
image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-nginx:${APP_ENV}
build:
context: ./api
target: api_platform_nginx
dockerfile: Dockerfile-nginx
<<: *cache
depends_on:
- php
volumes:
- ./api/public:/srv/api/public:ro
ports:
- "80:80"
environment:
- NGINX_HOST=php
- NGINX_ENV=${APP_ENV}
cap_drop:
- ALL
cap_add:
- chown
- dac_override
- setgid
- setuid
- net_bind_service
security_opt:
- no-new-privileges
# read_only: true
# helmPackage:
# image: alpine/helm:3.2.1
# volumes:
# - ./api/helm:/apps
# command: package /apps
# helmIndex:
# depends_on:
# - helmPackage
# image: alpine/helm:3.2.1
# volumes:
# - ./api/helm:/apps
# command: repo index /apps
redis:
image: redis:4-alpine
# MySQL database:
# db:
# image: mysql:5.7
# environment:
# - MYSQL_ROOT_PASSWORD=example
# - MYSQL_DATABASE=api
# - MYSQL_USER=api-platform
# - MYSQL_PASSWORD=!ChangeMe!
# volumes:
# - db-mysql:/var/lib/mysql:rw
# ports:
# - "3366:3306"
# Postgres db:
db:
image: postgres:10
environment:
- POSTGRES_DB=api
- POSTGRES_USER=api-platform
- POSTGRES_PASSWORD=!ChangeMe!
volumes:
- db-data:/var/lib/postgresql/data:rw
ports:
- "5432:5432"
rabbitmq:
image: rabbitmq:latest
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USERNAME}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
networks:
nlx:
name: nlx
volumes:
db-data: {}
db-mysql: {}
uc-data: {}
nlx-data-2: {}