-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
106 lines (99 loc) · 3.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
version: "3.8"
services:
traefik:
image: "traefik:v2.5"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
dodo:
build: ./dodo-github-visualization
environment:
SECRET_COOKIE_PASSWORD_FILE: /run/secrets/cookie_password
container_name: "dodo-visualization"
labels:
- "traefik.enable=true"
- "traefik.http.routers.dodo.rule=PathPrefix(`/`)"
- "traefik.http.routers.dodo.entrypoints=web"
secrets:
- cookie_password
dbservice:
build: ./dodo-database-service
environment:
SECRET_DB_PASSWORD_FILE: /run/secrets/db_password
container_name: "dodo-db-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.db.rule=PathPrefix(`/db-service`)"
- "traefik.http.routers.db.entrypoints=web"
secrets:
- mongo_user_pw
- mongo_user_username
mongodb:
image: mongo
container_name: mongodb
labels:
- "traefik.enable=true"
- "traefik.http.routers.db.rule=PathPrefix(`/database`)"
secrets:
- mongo_root_pw
- mongo_root_username
- mongo_user_pw
- mongo_user_username
environment:
- MONGO_INITDB_ROOT_USERNAME_FILE=/run/secrets/mongo_root_username
- MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/mongo_root_pw
- MONGO_INITDB_DATABASE=githubMirror
- DB_USER_FILE=/run/secrets/mongo_user_username # the first two secrets are handled by the offical mongo docker image
- DB_USER_PASSWORD_FILE=/run/secrets/mongo_user_pw # the user related are handled in the custom mongo-init.sh
volumes:
- mongodb-data:/data/db
- ./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
networks:
- mongodb_network
restart: unless-stopped
mongo-express:
image: mongo-express
container_name: mongo-express
labels:
- "traefik.enable=true"
- "traefik.http.routers.db.rule=PathPrefix(`/db-admin`)"
- "traefik.http.routers.db.entrypoints=web"
environment:
- ME_CONFIG_MONGODB_SERVER=mongodb
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
- ME_CONFIG_MONGODB_ADMINUSERNAME=root
- ME_CONFIG_MONGODB_ADMINPASSWORD=pass12345
- ME_CONFIG_BASICAUTH_USERNAME=admin
- ME_CONFIG_BASICAUTH_PASSWORD=admin123
volumes:
- mongodb-data:/data/db
depends_on:
- mongodb
networks:
- mongodb_network
restart: unless-stopped
volumes:
mongodb-data:
networks:
mongodb_network:
secrets:
cookie_password:
file: secrets/cookie_password.txt
mongo_root_pw:
file: secrets/mongo_root_pw.txt
mongo_root_username:
file: secrets/mongo_root_username.txt
mongo_user_pw:
file: secrets/mongo_user_pw.txt
mongo_user_username:
file: secrets/mongo_user_username.txt