-
Notifications
You must be signed in to change notification settings - Fork 37
/
docker-compose.yml
75 lines (72 loc) · 1.9 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
version: '3.8'
services:
bulwark:
image: softramsdocker/bulwark:latest
container_name: bulwark
environment:
MYSQL_USER: '${MYSQL_USER}'
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
MYSQL_DB_CHECK: '${MYSQL_DB_CHECK}'
DB_PASSWORD: '${DB_PASSWORD}'
DB_URL: '${DB_URL}'
DB_USERNAME: '${DB_USERNAME}'
DB_PORT: '${DB_PORT}'
DB_NAME: '${DB_NAME}'
DB_TYPE: '${DB_TYPE}'
NODE_ENV: '${NODE_ENV}'
DEV_URL: '${DEV_URL}'
SERVER_ADDRESS: '${SERVER_ADDRESS}'
PORT: '${PORT}'
JWT_KEY: '${JWT_KEY}'
JWT_REFRESH_KEY: '${JWT_REFRESH_KEY}'
CRYPTO_SECRET: '${CRYPTO_SECRET}'
CRYPTO_SALT: '${CRYPTO_SALT}'
depends_on:
- bulwark-db
networks:
static-network:
ipv4_address: 172.16.16.2
ports:
- '5000:5000'
expose:
- '5000'
stop_grace_period: 1m
volumes:
- bulwark-temp:/bulwark/src/temp:rw
command: >
sh -c "
until mysql --host=$${DB_URL} --user=$${MYSQL_USER} --password=$${MYSQL_ROOT_PASSWORD} --database=$${MYSQL_DB_CHECK} -e 'SELECT user FROM user;'; do
>&2 echo MySQL is unavailable - sleeping
sleep 1
done
&& echo MySQL should be up - starting up Bulwark.
&& npm run postinstall
&& echo Initial DB Creation
&& npm run docker:check
&& npm run start"
bulwark-db:
image: mysql:5.7.31
container_name: bulwark_db
environment:
MYSQL_DATABASE: '${DB_NAME}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
networks:
static-network:
ipv4_address: 172.16.16.3
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- bulwark-db:/var/lib/mysql:rw
restart: always
volumes:
bulwark-db:
bulwark-temp:
networks:
static-network:
ipam:
config:
- subnet: 172.16.16.0/29