forked from os2display/os2display-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
146 lines (145 loc) · 6.01 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
networks:
frontend:
external: true
app:
driver: bridge
internal: false
services:
client:
image: os2display/os2display-client:latest
networks:
- app
- frontend
environment:
- APP_SCREEN_CLIENT_PATH=${COMPOSE_SCREEN_CLIENT_PATH:?err}
- APP_API_PATH=${APP_API_PATH:?err}
- APP_API_AUTHENTICATION_ENDPOINT=${APP_API_AUTHENTICATION_ENDPOINT}
- APP_API_AUTHENTICATION_REFRESH_ENDPOINT=${APP_API_AUTHENTICATION_REFRESH_ENDPOINT}
- APP_DATA_PULL_INTERVAL=${APP_DATA_PULL_INTERVAL}
- APP_SCHEDULING_INTERVAL=${APP_SCHEDULING_INTERVAL}
- APP_DEBUG=${APP_DEBUG}
ports:
- '8091:8080'
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.clientos2display-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`) && PathPrefix(`${COMPOSE_SCREEN_CLIENT_PATH}`)"
- "traefik.http.routers.clientos2display-http.entrypoints=web"
- "traefik.http.routers.clientos2display-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.clientos2display.rule=Host(`${COMPOSE_SERVER_DOMAIN}`) && PathPrefix(`${COMPOSE_SCREEN_CLIENT_PATH}`)"
- "traefik.http.routers.clientos2display.entrypoints=websecure"
# - "traefik.http.routers.clientos2display.middlewares=apios2display"
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=ITKBasicAuth@file"
restart: always
admin:
image: os2display/os2display-admin-client:latest
networks:
- app
- frontend
environment:
- APP_ADMIN_CLIENT_PATH=${COMPOSE_ADMIN_CLIENT_PATH}
- API_PATH=${API_PATH}
- APP_TOUCH_BUTTON_REGIONS=${APP_TOUCH_BUTTON_REGIONS}
ports:
- '8092:8080'
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.adminos2display-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`) && PathPrefix(`${COMPOSE_ADMIN_CLIENT_PATH}`)"
- "traefik.http.routers.adminos2display-http.entrypoints=web"
- "traefik.http.routers.adminos2display-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.adminos2display.rule=Host(`${COMPOSE_SERVER_DOMAIN}`) && PathPrefix(`${COMPOSE_ADMIN_CLIENT_PATH}`)"
- "traefik.http.routers.adminos2display.entrypoints=websecure"
# - "traefik.http.routers.adminos2display.middlewares=apios2display"
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=ITKBasicAuth@file"
volumes:
- ./media:/var/www/html/public/media:rw
restart: always
api:
image: os2display/os2display-api-service:latest
networks:
- app
environment:
# PHP config values
- PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME}
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}
- PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE}
- PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE}
- PHP_TIMEZONE=UTC
- PHP_PM_MAX_CHILDREN=16
- PHP_OPCACHE_VALIDATE_TIMESTAMPS=0
# APP (Symfony)
- APP_SECRET=${APP_SECRET:?err}
- APP_DATABASE_URL=${APP_DATABASE_URL:?err}
- APP_JWT_PASSPHRASE=${APP_JWT_PASSPHRASE:?err}
- APP_JWT_TOKEN_TTL=${APP_JWT_TOKEN_TTL}
- APP_JWT_SCREEN_TOKEN_TTL=${APP_JWT_SCREEN_TOKEN_TTL}
- APP_JWT_REFRESH_TOKEN_TTL=${APP_JWT_REFRESH_TOKEN_TTL}
- APP_JWT_SCREEN_REFRESH_TOKEN_TTL=${APP_JWT_SCREEN_REFRESH_TOKEN_TTL}
- APP_ENV=${APP_ENV}
- APP_TRUSTED_PROXIES=${APP_TRUSTED_PROXIES}
- APP_CORS_ALLOW_ORIGIN=${APP_CORS_ALLOW_ORIGIN}
- APP_DEFAULT_DATE_FORMAT=${APP_DEFAULT_DATE_FORMAT}
- APP_OIDC_METADATA_URL=${OIDC_METADATA_URL}
- APP_OIDC_CLIENT_ID=${OIDC_CLIENT_ID}
- APP_OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET}
- APP_OIDC_REDIRECT_URI=${OIDC_REDIRECT_URI}
- APP_OIDC_LEEWAY=${OIDC_LEEWAY}
- APP_REDIS_CACHE_PREFIX=${APP_REDIS_CACHE_PREFIX}
- APP_REDIS_CACHE_DSN=${APP_REDIS_CACHE_DSN}
volumes:
- ./jwt:/var/www/html/config/jwt:rw
- ./media:/var/www/html/public/media:rw
restart: always
nginx-api:
image: os2display/os2display-api-service-nginx:latest
networks:
- app
- frontend
environment:
- PHP_FPM_SERVER=api
- NGINX_FPM_UPLOAD_MAX=${NGINX_FPM_UPLOAD_MAX}
depends_on:
- api
ports:
- "8093:8080"
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.apios2display-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.apios2display-http.entrypoints=web"
- "traefik.http.routers.apios2display-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.apios2display.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.apios2display.entrypoints=websecure"
# Redirect root / request to /${COMPOSE_ADMIN_CLIENT_PATH}
- "traefik.http.routers.apios2display.middlewares=redirect-to-admin"
- "traefik.http.middlewares.redirect-to-admin.redirectregex.regex=^https:\\/\\/([^\\/]+)\\/?$$"
- "traefik.http.middlewares.redirect-to-admin.redirectregex.replacement=https://$$1${COMPOSE_ADMIN_CLIENT_PATH}"
# - "traefik.http.routers.apios2display.middlewares=apios2display"
# - "traefik.http.middlewares.apios2display.ipwhitelist.sourcerange=212.10.60.163, 10.225.0.0/16"
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=ITKBasicAuth@file"
volumes:
- ./media:/var/www/html/public/media:rw
restart: always
redis:
image: 'redis:6'
restart: unless-stopped
networks:
- app
ports:
- '6379'
mariadb:
image: 'mariadb:lts'
restart: unless-stopped
networks:
- app
environment:
- MARIADB_DATABASE=${MARIADB_DATABASE}
- MARIADB_USER=${MARIADB_USER}
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
ports:
- '3306'