-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.template.yaml
59 lines (56 loc) · 1.92 KB
/
docker-compose.template.yaml
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
admin-db:
image: mongo:7
restart: ${RESTART_POLICY}
environment:
MONGO_INITDB_ROOT_USERNAME: "$ADMIN_DB_ROOT"
MONGO_INITDB_ROOT_PASSWORD: "$ADMIN_DB_ROOT_PASSWORD"
MONGO_INITDB_DATABASE: "workadventure"
volumes:
- ./data/admin:/data/db
- ./data/database:/docker-entrypoint-initdb.d:ro
admin_php:
build: ../php
restart: ${RESTART_POLICY}
environment:
ADMIN_API_TOKEN : "$ADMIN_API_TOKEN"
ADMIN_API_SALT : "$ADMIN_API_SALT"
DB_USER: "$ADMIN_DB_USER"
DB_PASSWORD: "$ADMIN_DB_PASSWORD"
DB_NAME: "workadventure"
DOMAIN: "$DOMAIN"
START_ROOM_URL: "$START_ROOM_URL"
SIDECAR_URL: "$SIDECAR_URL"
volumes:
- ./src:/var/www/html:ro
- ./vendor:/var/www/vendor:ro
depends_on:
- admin-db
- sidecar
composer:
image: composer/composer
command: ["composer", "install", "--ignore-platform-req=ext-mongodb"]
volumes:
- ./:/app
admin:
build: ../nginx
restart: ${RESTART_POLICY}
environment:
DOMAIN: "$DOMAIN"
depends_on:
- admin_php
volumes:
- ./src:/var/www/html:ro
- ./vendor:/var/www/vendor:ro
- ./containers/nginx:/etc/nginx/templates
labels:
traefik.http.middlewares.strip-admin-prefix.stripprefix.prefixes: "/admin"
traefik.http.routers.admin.rule: "(Host(`${DOMAIN}`) && PathPrefix(`/admin`))"
traefik.http.routers.admin.middlewares: "strip-admin-prefix@docker"
traefik.http.routers.admin.entryPoints: "web"
traefik.http.services.admin.loadbalancer.server.port: "80"
traefik.http.routers.admin-ssl.rule: "(Host(`${DOMAIN}`) && PathPrefix(`/admin`))"
traefik.http.routers.admin-ssl.middlewares: "strip-admin-prefix@docker"
traefik.http.routers.admin-ssl.entryPoints: "websecure"
traefik.http.routers.admin-ssl.tls: "true"
traefik.http.routers.admin-ssl.service: "admin"
traefik.enable: "true"