-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
47 lines (43 loc) · 985 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
41
42
43
44
45
46
47
version: "3.9"
services:
web:
image: ${ACCOUNT_FRONTEND_IMAGE}
depends_on:
- api
ports:
- "8088:80"
api:
depends_on:
- mysql
image: ${ACCOUNT_IMAGE}
ports:
- "8081:80"
volumes:
- .:/go/src/github.com/bitmyth/accounts
- ./config:/config
restart: always
command: go run src/server/main.go
mysql:
image: mysql:5.7
volumes:
- mysql:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DB}
TZ: Asia/Shanghai
command: --character-set-server=utf8mb4 --default-time-zone=+08:00
db-migration:
image: bitmyth/goose:v1.0.0
depends_on:
- mysql
working_dir: /migrations
volumes:
- ./src/database/migrations:/migrations
command: goose up
environment:
GOOSE_DRIVER: mysql
GOOSE_DBSTRING: root:${MYSQL_PASSWORD}@tcp(mysql)/${MYSQL_DB}
volumes:
mysql:
#external: true