-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.sample.yml
49 lines (49 loc) · 1.03 KB
/
docker-compose.sample.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
version: "3"
services:
mysql:
image: mysql:${MYSQL_VERSION}
ports:
- "${MYSQL_HOST_PORT}:3306"
volumes:
- ${MYSQL_CONF_FILE}:/etc/mysql/conf.d/mysql.cnf:ro
- ${DATA_DIR}/mysql:/var/lib/mysql/:rw
restart: always
networks:
- default
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
TZ: "$TZ"
go:
image: golang:${GO_VERSION}-alpine${ALPINE_VERSION}
ports:
- "${GO_PORT}:8088"
expose:
- 8808
volumes:
- ${CODE_DIR}:/code/:rw
restart: always
cap_add:
- SYS_PTRACE
networks:
- default
tty: true
environment:
GOPROXY: ${GO_PROXY}
TZ: "$TZ"
depends_on:
- mysql
redis:
image: redis:${REDIS_VERSION}
ports:
- "${REDIS_HOST_PORT}:6379"
volumes:
- ${REDIS_CONF_FILE}:/etc/redis.conf:ro
- ${DATA_DIR}/redis:/data/:rw
restart: always
entrypoint: ["redis-server", "/etc/redis.conf"]
environment:
TZ: "$TZ"
networks:
- default
networks:
default: