-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
87 lines (77 loc) · 1.6 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
81
82
83
84
85
86
87
version: '2'
services:
workspace:
container_name: ginapp_ws
#build: ./docker/workspace
image: busybox
volumes:
- ${GO_PATH}:/workspace
- ${APP_PATH}:/workspace/src/app
- ${GO_BIN}:/workspace/bin
networks:
- mainnet
db:
container_name: ginapp_db
image: mysql:5.7
#build: ./docker/db
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_DATABASE: 'blog'
# So you don't have to use root, but you can if you like
#MYSQL_USER: 'blog'
# You can use whatever password you like
#MYSQL_PASSWORD: 'batur'
# Password for root access
MYSQL_ROOT_PASSWORD: 'batur'
#STARTUP_SQL: "/tmp/init/db.sql"
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3306:3306'
expose:
# Opens port 3306 on the container
- '3306'
volumes_from:
- workspace
links:
- workspace
networks:
- mainnet
adminer:
container_name: ginapp_adminer
image: adminer
restart: always
ports:
- 8080:8080
networks:
- mainnet
redis:
container_name: ginapp_rd
image: redis
ports:
- "6379:6379"
volumes:
- ../data/redis:/data
networks:
- mainnet
go:
container_name: ginapp_go
build: ./docker/go
ports:
- "8000:8000"
expose:
- "8000"
volumes_from:
- workspace
networks:
- mainnet
links:
- workspace
volumes:
data-sync:
external: true
gopath-sync:
external: true
gobin-sync:
external: true
networks:
mainnet: