-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
40 lines (39 loc) · 970 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
34
35
36
37
38
39
40
version: "2"
services:
web:
build:
context: .
dockerfile: docker/web/Dockerfile
container_name: app.dev
volumes:
- .:/go/src/go-mysql-rest-api
working_dir: /go/src/go-mysql-rest-api
command: go run main.go
ports:
- "3000:3000" # http
links:
- db
adminer:
image: adminer
restart: always
ports:
- 8080:8080
db:
build:
context: .
dockerfile: docker/db/Dockerfile
image: my-mysql:1.0
container_name: database.dev
hostname: database.dev
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: pasaribu
MYSQL_DATABASE: shopee
# sync folders. MySQL data is stored outside container so that rebuilding doesn't clear db.
# folder is at workspace root.
volumes:
#- ../../_local_mysql_data:/var/lib/mysql
#- ./shopee.sql:/tmp/shopee.sql
#- ./import.sh:/tmp/import.sh
- ./mysql_init:/docker-entrypoint-initdb.d