generated from pikachu0310/go-backend-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
46 lines (43 loc) · 927 Bytes
/
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
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
APP_ADDR: :8080
DB_USER: root
DB_PASS: pass
DB_HOST: db
DB_PORT: "3306"
DB_NAME: app
depends_on:
db:
condition: service_healthy
develop:
watch:
- action: rebuild
path: ./
db:
container_name: myapp_db
image: mariadb:latest
command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: app
ports:
- "3306:3306"
healthcheck:
test: mariadb --user=root --password=pass --execute "SHOW DATABASES;"
interval: 1s
timeout: 10s
retries: 30
adminer:
image: adminer:latest
ports:
- "8081:8080"
depends_on:
db:
condition: service_healthy