-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
82 lines (75 loc) · 1.95 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
version: '3.1'
volumes:
mongo:
services:
traefik:
image: 'traefik'
command:
- '--api.insecure=true'
- '--providers.docker'
- '--entrypoints.http.address=:80'
- '--providers.docker.exposedByDefault=false'
ports:
- '80:80'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
mongo:
image: 'mongo:4.4'
expose:
- '27017'
volumes:
- 'mongo:/data/db'
environment:
MONGO_INITDB_ROOT_USERNAME: 'root'
MONGO_INITDB_ROOT_PASSWORD: 'root'
auth:
image: 'authserver'
build:
dockerfile: './images/authserver.Dockerfile'
context: '.'
expose:
- '80'
depends_on:
- 'mongo'
volumes:
- './cert/key.pem:/cert/key.pem:ro'
environment:
APP_MONGO_CONNECTIONSTRING: 'mongodb://root:root@mongo:27017/admin'
APP_MONGO_DATABASE: 'tokenapp'
APP_ROOT_USERNAME: 'root'
APP_ROOT_PASSWORD: 'root'
APP_PRIVATEKEYFILE: '/cert/key.pem'
APP_WS_PREFIX: '/api/auth'
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.auth.entrypoints=http'
- 'traefik.http.routers.auth.rule=PathPrefix(`/api/auth`)'
resources:
image: 'resourceserver'
build:
dockerfile: './images/resourceserver.Dockerfile'
context: '.'
expose:
- '80'
depends_on:
- 'mongo'
volumes:
- './cert/cert.pem:/cert/cert.pem:ro'
environment:
APP_PUBLICKEYFILE: '/cert/cert.pem'
APP_WS_PREFIX: '/api/resources'
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.resources.entrypoints=http'
- 'traefik.http.routers.resources.rule=PathPrefix(`/api/resources`)'
webapp:
image: 'webapp'
build:
dockerfile: './images/webapp.Dockerfile'
context: '.'
expose:
- '80'
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.webapp.entrypoints=http'
- 'traefik.http.routers.webapp.rule=PathPrefix(`/`)'