-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
91 lines (85 loc) · 1.88 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
version: '3'
services:
vault:
build:
context: ./vault
dockerfile: test.Dockerfile
ports:
- 8200:8200
volumes:
- ./vault/config:/vault/config
- ./vault/policies:/vault/policies
- ./vault/data:/vault/data
- ./vault/logs:/vault/logs
environment:
- VAULT_ADDR=http://127.0.0.1:8200
cap_add:
- IPC_LOCK
depends_on:
- consul
- db
networks:
- mynetwork
consul:
build:
context: ./consul
dockerfile: test.dockerfile
ports:
- 8500:8500
command: agent -server -bind 0.0.0.0 -client 0.0.0.0 -bootstrap-expect 1 -config-file=/consul/config/config.json
volumes:
- ./consul/config/consul-config.json:/consul/config/config.json
- ./consul/data:/consul/data
networks:
- mynetwork
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=webmail
- MYSQL_USER=webmail
- MYSQL_PASSWORD=webmailpasswd
networks:
- mynetwork
ServiceOne:
image: node:alpine
volumes:
- ./ServiceOne:/app
- ./proto:/proto
- ./certs:/certs
working_dir: /app
depends_on:
- db
environment:
NODE_ENV: development
dbhost: db
vaulthost: vault
consulhost: consul
serviceOne: ServiceOne
serviceTwo: ServiceTwo
command: npm start
networks:
- mynetwork
ServiceTwo:
image: node:alpine
volumes:
- ./ServiceTwo:/app
- ./proto:/proto
- ./certs:/certs
working_dir: /app
depends_on:
- db
environment:
NODE_ENV: development
dbhost: db
vaulthost: vault
consulhost: consul
serviceOne: ServiceOne
serviceTwo: ServiceTwo
command: npm start
networks:
- mynetwork
networks:
mynetwork: