-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (37 loc) · 858 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (37 loc) · 858 Bytes
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
version: '3.5'
services:
api:
depends_on:
- db
build:
context: .
dockerfile: ./docker/go/Dockerfile
target: build
container_name: wantum_api
environment:
MYSQL_USER: worker
MYSQL_PASSWORD: password
MYSQL_DATABASE: wantum
MYSQL_HOST: db
MYSQL_PORT: 3306
volumes:
- .:/go/src/wantum
ports:
- 8080:8080
restart: always
command: realize start
db:
image: mysql:5.7
container_name: wantum_db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: wantum
MYSQL_USER: worker
MYSQL_PASSWORD: password
TZ: 'Asia/Tokyo'
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- ./db/mysql/init.d:/docker-entrypoint-initdb.d
ports:
- 3306:3306
restart: always