-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.dev.yml
133 lines (126 loc) · 6.38 KB
/
docker-compose.dev.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
# Compose file for local development and testing. Images are built from
# local directories which need to be cloned from the repository.
services:
traefik:
command:
# - "--log.level=DEBUG"
# - "--accesslog=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
networks:
- testcenter
testcenter-broadcasting-service:
labels:
- "traefik.enable=true"
- "traefik.http.routers.testcenter-broadcasting-service.rule=(HostRegexp(`{[a-z]*}.${HOSTNAME}`) || Host(`${HOSTNAME}`)) && PathPrefix(`/bs/public`)"
- "traefik.http.routers.testcenter-broadcasting-service.middlewares=testcenter-broadcasting-service-stripprefix, security-headers-bs"
- "traefik.http.middlewares.testcenter-broadcasting-service-stripprefix.stripprefix.prefixes=/bs/public"
- "traefik.http.middlewares.security-headers-bs.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.security-headers-bs.headers.customFrameOptionsValue=SAMEORIGIN"
- "traefik.http.middlewares.security-headers-bs.headers.referrerPolicy=no-referrer"
build:
dockerfile: broadcasting-service/Dockerfile
target: dev
volumes:
- ./common:/usr/src/testcenter/common
- ./broadcasting-service/src:/usr/src/testcenter/broadcasting-service/src
- ./docs/dist:/usr/src/testcenter/docs/dist
networks:
- testcenter
testcenter-frontend:
labels:
- "traefik.enable=true"
- "traefik.http.routers.testcenter-frontend.rule=HostRegexp(`{[a-z]*}.${HOSTNAME}`) || Host(`${HOSTNAME}`)"
- "traefik.http.routers.testcenter-frontend.middlewares=security-headers-frontend, stripwww-fe"
- "traefik.http.middlewares.security-headers-frontend.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.security-headers-frontend.headers.customFrameOptionsValue=SAMEORIGIN"
- "traefik.http.middlewares.security-headers-frontend.headers.referrerPolicy=no-referrer"
- "traefik.http.middlewares.stripwww-fe.redirectregex.regex=^http(s?)://www.${HOSTNAME}/(.*)"
- "traefik.http.middlewares.stripwww-fe.redirectregex.replacement=http$${1}://${HOSTNAME}/$${2}"
build:
dockerfile: frontend/Dockerfile
target: dev
volumes:
- ./common:/usr/src/testcenter/common
- ./definitions:/usr/src/testcenter/definitions
- ./frontend/src:/usr/src/testcenter/frontend/src
- ./docs/dist:/usr/src/testcenter/docs/dist
networks:
- testcenter
testcenter-cache-service:
ports:
- "6379:6379"
testcenter-file-service:
labels:
- "traefik.enable=true"
- "traefik.http.routers.testcenter-file-service.rule=(HostRegexp(`{[a-z]*}.${HOSTNAME}`) || Host(`${HOSTNAME}`)) && PathPrefix(`/fs`)"
- "traefik.http.routers.testcenter-file-service.middlewares=testcenter-file-service-stripprefix, security-headers-fs"
- "traefik.http.middlewares.testcenter-file-service-stripprefix.stripprefix.prefixes=/fs"
- "traefik.http.middlewares.security-headers-fs.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.security-headers-fs.headers.customFrameOptionsValue=SAMEORIGIN"
- "traefik.http.middlewares.security-headers-fs.headers.referrerPolicy=no-referrer"
build:
dockerfile: file-service/Dockerfile
args:
ENABLED_MODULES: lua
volumes:
- ./sampledata/sample_resource_package.itcr.zip:/var/www/data-TEST/ws_1/Resource/sample_resource_package.itcr.zip
- ./sampledata/SAMPLE_UNITCONTENTS.HTM:/var/www/data-TEST/ws_1/Resource/SAMPLE_UNITCONTENTS.HTM
- ./sampledata/verona-player-simple-6.0.html:/var/www/data-TEST/ws_1/Resource/verona-player-simple-6.0.html
- ./sampledata/coding-scheme.vocs.json:/var/www/data-TEST/ws_1/Resource/coding-scheme.vocs.json
- ./data:/var/www/html/
- ./file-service/nginx.conf:/etc/nginx/nginx.conf
- ./file-service/auth/:/usr/share/nginx/auth
- ./file-service/no-cors.conf:/etc/nginx/conf.d/cors.conf
networks:
- testcenter
testcenter-backend:
labels:
- "traefik.enable=true"
- "traefik.http.routers.testcenter-backend.rule=(HostRegexp(`{[a-z]*}.${HOSTNAME}`) || Host(`${HOSTNAME}`)) && PathPrefix(`/api`)"
- "traefik.http.routers.testcenter-backend.middlewares=testcenter-backend-stripprefix, security-headers-backend"
- "traefik.http.middlewares.testcenter-backend-stripprefix.stripprefix.prefixes=/api"
- "traefik.http.middlewares.security-headers-backend.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.security-headers-backend.headers.customFrameOptionsValue=SAMEORIGIN"
- "traefik.http.middlewares.security-headers-backend.headers.referrerPolicy=no-referrer"
build:
dockerfile: backend/Dockerfile
target: dev
volumes:
- ./backend/.htaccess:/var/www/testcenter/backend/.htaccess
- ./backend/config/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./backend/config/local.php.ini:/usr/local/etc/php/conf.d/local.ini
- ./backend/config/no-cors.htaccess/:/var/www/testcenter/.htaccess
- ./backend/config/vhost.conf:/etc/apache2/sites-available/vhost.conf
- ./backend/index.php:/var/www/testcenter/backend/index.php
- ./backend/initialize.php:/var/www/testcenter/backend/initialize.php
- ./backend/routes.php:/var/www/testcenter/backend/routes.php
- ./backend/src:/var/www/testcenter/backend/src
- ./backend/test:/var/www/testcenter/backend/test
- ./data:/var/www/testcenter/data
- ./definitions:/var/www/testcenter/definitions
- ./docs/dist:/docs/dist
- ./package.json:/var/www/testcenter/package.json
- ./sampledata:/var/www/testcenter/sampledata
- ./scripts/database:/var/www/testcenter/scripts/database
environment:
TLS_ENABLED: ${TLS_ENABLED:-off}
ports:
- 9005:9003
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- testcenter
testcenter-db:
ports:
- "9091:3306"
command:
- "--explicit-defaults-for-timestamp=TRUE"
- "--sql-mode=PIPES_AS_CONCAT,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
- "--tls-version=TLSv1.2,TLSv1.3"
- "--max-connections=500"
- "--log_error_verbosity=2"
volumes:
- ./scripts/database/000-create-test-db.sh:/docker-entrypoint-initdb.d/000-create-test-db.sh
networks:
- testcenter