-
Notifications
You must be signed in to change notification settings - Fork 396
/
docker-compose.yml
33 lines (33 loc) · 1020 Bytes
/
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
version: '2'
services:
web:
build:
context: .
dockerfile: .docker/web/Dockerfile
# ports from container exposed to the docker machine and the guest machine
ports:
# 80 on the host, 8080 on the guest. Websever listens on 8080
- "8080:8080" # http
# - "443:443" # https
# file with environment declarations for the container
env_file:
- .docker/web/.env
# Link to containers in another service
depends_on:
- db
command: ["./wait-for-it.sh", "db:3306", "--", "./PPGo_Job"]
# sync workspace folder with /go
db:
image: mysql:5.7
ports:
- "3306:3306"
environment:
MYSQL_USER: gotest
MYSQL_PASSWORD: gotest
MYSQL_ROOT_PASSWORD: gotest
MYSQL_DATABASE: local_gotest
# sync folders. MySQL data is stored outside container so that rebuilding doesn't clear db.
# folder is at workspace root.
volumes:
- .docker/_local_mysql_data:/var/lib/mysql
- .docker/db:/docker-entrypoint-initdb.d