-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
87 lines (79 loc) · 1.68 KB
/
docker-compose.yaml
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: '3.8'
services:
go:
container_name: go
build:
context: ./backend
dockerfile: Dockerfile
tty: true
ports:
- 8080:8080
depends_on:
- db
volumes:
- type: bind
source: ./backend
target: /go/src
environment:
- "GO111MODULES=on"
- "PORT=8080"
- "DB_WRITE_HOST=db"
- "DB_WRITE_PORT=3306"
- "DB_WRITE_USER=root"
- "DB_WRITE_PASS=root_password"
- "DB_WRITE_NAME=get5_go"
- "DB_READ_HOST=db"
- "DB_READ_PORT=3306"
- "DB_READ_USER=root"
- "DB_READ_PASS=root_password"
- "SECRET_KEY=get5_secret_key"
networks:
- backend_network
db:
container_name: db
build:
context: ./docker/db
dockerfile: Dockerfile
tty: true
platform: linux/x86_64
ports:
- 3306:3306
env_file:
- ./docker/db/.env
volumes:
- type: volume
source: mysql_test_volume
target: /var/lib/mysql
- type: bind
source: ./docker/db/init
target: /docker-entrypoint-initdb.d
- type: bind
source: ./backend/sqlc
target: /docker-init-sqlc-definitions.d
networks:
- backend_network
srcds:
profiles:
- test_srcds
container_name: srcds
build:
context: ./docker/srcds
dockerfile: Dockerfile
tty: true
stdin_open: true
platform: linux/x86_64
ports:
- 27015:27015
- 27015:27015/udp
volumes:
- type: bind
source: ./docker/srcds
target: /home/steam
networks:
- backend_network
volumes:
mysql_test_volume:
name: mysql_test_volume
networks:
backend_network:
external: false