-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
65 lines (60 loc) · 1.33 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
version: "3.8"
services:
# app:
# build:
# context: ./.realize
# container_name: gocleanarchitecture
# volumes:
# - .:/gocleanarchitecture/
# working_dir: /gocleanarchitecture
# environment:
# - ENV
# - MYSQL_HOST
# - MYSQL_PORT
# - LOG_LEVEL
# ports:
# - 10000:10000
# logging:
# driver: "json-file"
# options:
# max-file: "3"
# max-size: "5m"
# depends_on:
# - db
# redis:
# image: redis
# ports:
# - 16379:6379
# configs:
# - redis_config
# volumes:
# - gocleanarchitectureredis:/data
db:
image: mysql:8.0
restart: always
volumes:
- gocleanarchitecturemysql:/var/lib/mysql
- ./databases/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- ${MYSQL_PORT}:3306
environment:
- MYSQL_ROOT_PASSWORD
- MYSQL_PASSWORD
- MYSQL_USER
- MYSQL_DATABASE
command:
[
"mysqld",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--default-authentication-plugin=mysql_native_password",
"--autocommit=OFF",
]
# configs:
# redis_config:
# file: ./.redis.conf
volumes:
gocleanarchitecturemysql:
driver: local
# gocleanarchitectureredis:
# driver: local