-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
63 lines (58 loc) · 1.35 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
version: "3.3"
services:
web:
build:
context: .
dockerfile: ./docker/web.Dockerfile
ports:
- ${SERVER_PORT}:${SERVER_PORT}
- ${DEBUG_PORT}:2345
volumes:
- .:/clean_gin_web
env_file: .env
container_name: clean-gin-web
security_opt:
- seccomp:unconfined
depends_on:
database:
condition: service_healthy
database:
build:
context: .
dockerfile: ./docker/db.Dockerfile
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASS}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_ROOT_HOST: "%"
container_name: clean-gin-db
command:
[
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--default-authentication-plugin=mysql_native_password",
]
ports:
- 33068:3306
volumes:
- clean_gin_db:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: "1s"
timeout: "10s"
retries: 10
start_period: "1s"
adminer:
image: adminer
ports:
- ${ADMINER_PORT}:8080
# swagger-ui:
# image: swaggerapi/swagger-ui
# container_name: swagger-ui
# ports:
# - ${SWAGGER_PORT}:8080
# volumes:
# - ./docs:/usr/share/nginx/html/docs
# environment:
# API_URL: docs/openapi.yaml
volumes:
clean_gin_db: