-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (80 loc) · 1.85 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
services:
db:
image: mariadb:11.5.2
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: booq-v3
MYSQL_USERNAME: root
MYSQL_PASSWORD: password
volumes:
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
expose:
- '3306'
ports:
- '3306:3306'
healthcheck:
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
s3:
image: minio/minio
restart: unless-stopped
ports:
- '9000:9000'
- '9001:9001'
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: password
MINIO_ACCESS_KEY: minio_access_key
MINIO_SECRET_KEY: minio_secret_key
s3-init:
image: minio/mc
depends_on:
- s3
entrypoint: >
/bin/sh -c "
mc alias set s3-local http://s3:9000 admin password;
mc mb s3-local/booq-v3;
"
booq-server:
build: .
environment:
BOOQ_ENV: development
MYSQL_HOST: db
MYSQL_USER: root
MYSQL_PASSWORD: password
MYSQL_DATABASE: booq-v3
S3_BUCKET: booq-v3
S3_REGION: ap-northeast-1
S3_ENDPOINT: http://s3:9000
S3_ACCESS_KEY: minio_access_key
S3_SECRET_KEY: minio_secret_key
ports:
- '8080:3001'
depends_on:
db:
condition: service_healthy
s3-init:
condition: service_completed_successfully
develop:
watch:
- path: ./Dockerfile
action: rebuild
- path: ./go.mod
action: rebuild
- path: ./main.go
action: rebuild
- path: ./model
action: rebuild
- path: ./router
action: rebuild
- path: ./storage
action: rebuild
adminer:
image: adminer
restart: always
ports:
- 8000:8080