forked from davidhay2/datavault-fork-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
171 lines (161 loc) · 4.83 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
version: '3'
services:
rabbitmq:
image: rabbitmq:3-management-alpine
volumes:
- ./docker/rabbitmq_data:/bitnami
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: datavault
RABBITMQ_DEFAULT_PASS: datavault
networks:
- mqnet
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:15672"]
interval: 30s
timeout: 10s
retries: 5
mysql:
image: mysql:5.7
ports:
- "53306:3306"
volumes:
- ./docker/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: unbr34kable
MYSQL_DATABASE: datavault
MYSQL_USER: datavault
MYSQL_PASSWORD: datavault
networks:
- dbnet
maven-build:
image: datavault/maven-build
build:
context: .
dockerfile: maven.Dockerfile
volumes:
- .docker/m2/repository:/root/.m2/repository
- ./datavault-assembly/target/datavault-assembly-1.0-SNAPSHOT-assembly/datavault-home:/usr/src/datavault-assembly/target/datavault-assembly-1.0-SNAPSHOT-assembly/datavault-home
workers:
build:
context: .
dockerfile: worker.Dockerfile
volumes:
- ./docker/tmp/datavault/active:/tmp/datavault/active:rw
- ./docker/tmp/datavault/archive:/tmp/datavault/archive:rw
- ./docker/tmp/datavault/temp:/tmp/datavault/temp:rw
- ./docker/tmp/datavault/meta:/tmp/datavault/meta:rw
- ./docker/tmp/Users:/Users:rw
- ./docker/config:/etc/datavault/
- ./docker/keystore:/docker_datavault-home/keystore/
- ./docker/scripts:/docker_datavault-home/scripts/
- ./docker/.occ:/home/datavault/.occ/
networks:
- mqnet
- vault
depends_on:
- rabbitmq
- maven-build
broker:
build:
context: .
dockerfile: broker.Dockerfile
volumes:
- ./docker/tmp/datavault/active:/tmp/datavault/active:rw
- ./docker/tmp/datavault/archive:/tmp/datavault/archive:rw
- ./docker/tmp/datavault/temp:/tmp/datavault/temp:rw
- ./docker/tmp/datavault/meta:/tmp/datavault/meta:rw
- ./docker/tmp/Users:/Users:rw
- ./docker/config:/etc/datavault/
- ./docker/keystore:/docker_datavault-home/keystore/
- ./docker/scripts:/docker_datavault-home/scripts/
- ./datavault-assembly/target/datavault-assembly-1.0-SNAPSHOT-assembly/datavault-home/lib:/docker_datavault-home/lib
- ./datavault-assembly/target/datavault-assembly-1.0-SNAPSHOT-assembly/datavault-home/webapps:/docker_datavault-home/webapps
- ./datavault-assembly/src/datavault-home/config/mail-templates:/docker_datavault-home/config/mail-templates
networks:
- webapp
- dbnet
- mqnet
- vault
depends_on:
- rabbitmq
- mysql
web:
build:
context: .
dockerfile: webapp.Dockerfile
ports:
- "58080:8080"
volumes:
- ./docker/tmp/datavault/active:/tmp/datavault/active:rw
- ./docker/tmp/datavault/archive:/tmp/datavault/archive:rw
- ./docker/tmp/datavault/temp:/tmp/datavault/temp:rw
- ./docker/tmp/datavault/meta:/tmp/datavault/meta:rw
- ./docker/tmp/Users:/Users:rw
- ./docker/config:/etc/datavault/
- ./docker/scripts:/docker_datavault-home/scripts/
- ./datavault-assembly/target/datavault-assembly-1.0-SNAPSHOT-assembly/datavault-home/lib:/docker_datavault-home/lib
- ./datavault-assembly/target/datavault-assembly-1.0-SNAPSHOT-assembly/datavault-home/webapps:/docker_datavault-home/webapps
- ./docker/pure:/tmp/
networks:
- webapp
- selenium
depends_on:
- broker
vault:
image: vault
command: server -dev
ports:
- "127.0.0.1:8200:8200"
environment:
VAULT_DEV_ROOT_TOKEN_ID: datavault
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
volumes:
- ./docker/vault/logs:/vault/logs:rw
cap_add:
- IPC_LOCK
networks:
- vault
vault-administration:
image: vault
command:
- /bin/sh
- -c
- |
while ! $$(vault status &> /dev/null); do echo "Trying to connect to vault"; sleep 2; done
sleep 40
vault login $${VAULT_DEV_ROOT_TOKEN_ID}
vault secrets enable -version=2 kv
vault kv put kv/datavault data-encryption-key=$$(echo -n '`cat /dev/urandom | head -n 128`' | base64) ssh-encryption-key=$$(echo -n '`cat /dev/urandom | head -n 128`' | base64)
vault kv get kv/datavault
environment:
VAULT_DEV_ROOT_TOKEN_ID: "datavault"
VAULT_ADDR: "http://vault:8200"
depends_on:
- vault
networks:
- vault
selenium:
image: selenium/standalone-firefox
networks:
- selenium
ports:
- "4444:4444"
depends_on:
- web
#volumes:
# db_data:
# rabbitmq_data:
networks:
webapp:
driver: bridge
dbnet:
driver: bridge
mqnet:
driver: bridge
selenium:
driver: bridge
vault:
driver: bridge