-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (41 loc) · 1 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
version: "3.7"
services:
# Define the node.js web server
web:
build: .
command: ./wait-for-it.sh db:3306 -- npm start
user: "node"
environment:
- DOCKER_ENVIRONMENT
- NODE_ENV=production
volumes:
- ./:/usr/src/app/code
depends_on:
- db
expose:
- "8080"
ports:
# Mapping a host IP to our web server so we can test it.
# 127.0.0.12:80 on the host points to port 8080 inside the container
# Mapp this IP to an entry in the hosts file such as drawyio.dev
- "127.0.0.12:80:8080"
networks:
testing:
ipv4_address: 172.29.1.1
# Define the mysql database server
db:
image: mysql:8.0.19
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: sJlaNwiaB
networks:
testing:
ipv4_address: 172.29.1.2
# A network for our containers
networks:
testing:
ipam:
driver: default
config:
- subnet: 172.29.0.0/16