-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yaml
72 lines (72 loc) · 1.85 KB
/
docker-compose.yaml
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
version: '3'
services:
app:
build:
context: '.'
dockerfile: 'docker/node'
args:
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_PORT=$MYSQL_PORT
- SSL_ENABLED=$SSL_ENABLED
- SSL_KEY=$SSL_KEY
- SSL_CERTIFICATE=$SSL_CERTIFICATE
- SERVER_PORT=$SERVER_PORT
- SERVER_ADDRESS=0.0.0.0
- WEBSOCKET_PORT=$WEBSOCKET_PORT
- AUTO_ACCEPT_CONNECTION=$AUTO_ACCEPT_CONNECTION
- ALLOWED_ORIGINS=$ALLOWED_ORIGINS
restart: always
ports:
- "$WEBSOCKET_PORT:$WEBSOCKET_PORT"
environment:
- MYSQL_USERNAME=dev
- MYSQL_PASSWORD=secret
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_HOSTNAME=mysql
- MYSQL_PORT=$MYSQL_PORT
- SSL_ENABLED=$SSL_ENABLED
- SSL_KEY=$SSL_KEY
- SSL_CERTIFICATE=$SSL_CERTIFICATE
- SERVER_PORT=$SERVER_PORT
- SERVER_ADDRESS=$SERVER_ADDRESS
- WEBSOCKET_PORT=$WEBSOCKET_PORT
- AUTO_ACCEPT_CONNECTION=$AUTO_ACCEPT_CONNECTION
- ALLOWED_ORIGINS=$ALLOWED_ORIGINS
networks:
main:
ipv4_address: 172.25.0.2
aliases:
- node
mysql:
build:
context: .
dockerfile: 'docker/mysql'
args:
- SERVER_ADDRESS=172.25.0.2
- SERVER_PORT=$SERVER_PORT
platform: linux/amd64
ports:
- "$MYSQL_PORT:$MYSQL_PORT"
restart: always
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_USER=dev
- MYSQL_PASSWORD=secret
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_PORT=$MYSQL_PORT
- SERVER_PORT=$SERVER_PORT
- SERVER_ADDRESS=$SERVER_ADDRESS
networks:
main:
ipv4_address: 172.25.0.3
aliases:
- mysql
volumes:
- ./bin:/docker-entrypoint-initdb.d
networks:
main:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16
gateway: 172.25.0.1