-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
100 lines (97 loc) · 2.84 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
version: '3.2'
services:
# frontend_angular is a web server that provides the JS to the clients.
frontend_angular:
container_name: adh6_frontend
build:
context: frontend_angular
dockerfile: Dockerfile.dev
expose:
- "80" # app does not start as root here
volumes:
# Make a bind mount so you can modify files in the container
- type: bind
source: "./frontend_angular/src"
target: "/adh6/frontend_angular/src/"
read_only: true
# api_server is the API that actually does action on the database.
api_server:
container_name: adh6_backend
build: api_server
depends_on:
database:
condition: service_healthy
expose:
- "8080"
environment:
ENVIRONMENT: "development"
OAUTH2_BASE_PATH: "https://cas.minet.net/oidc/profile"
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_DB_NAME: ${DATABASE_DB_NAME}
api_server_member:
container_name: adh6_backend_member
build: api_server
depends_on:
database:
condition: service_healthy
expose:
- "8080"
environment:
ENVIRONMENT: "development"
OAUTH2_BASE_PATH: "https://cas.minet.net/oidc/profile"
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_DB_NAME: ${DATABASE_DB_NAME}
reverse_proxy:
container_name: adh6_reverse_proxy
build: reverse_proxy
links:
- frontend_angular
- api_server
- api_server_member
ports:
- "443:443"
- "80:80"
volumes:
- ./reverse_proxy:/etc/nginx/templates
environment:
ADH6_URL: "adh6-local.minet.net"
API_HOST: "api_server"
API_PORT: "8080"
FRONTEND_HOST: "frontend_angular"
FRONTEND_PORT: "80"
command: ['nginx-debug', '-g', 'daemon off;']
database:
read_only: true
container_name: adh6_database
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: ${DATABASE_DB_NAME}
MYSQL_USER: ${DATABASE_USERNAME}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
ports:
- 3306:3306
security_opt:
- no-new-privileges:true
tmpfs:
- /var/lib/mysql:rw
- /tmp:rw
- /run/mysqld/:rw
healthcheck:
test: "/usr/bin/mysql --user=${DATABASE_USERNAME} --password=${DATABASE_PASSWORD} --execute \"SHOW DATABASES;\""
# test: "/usr/local/mysql/bin/mysql --user=foo --password=foo --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
jaeger:
image: jaegertracing/all-in-one:1.22
environment:
COLLECTOR_ZIPKIN_HOST_PORT: :9411
ports:
- 16686:16686