-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (42 loc) · 989 Bytes
/
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
version: '3'
services:
client:
build:
context: .
dockerfile: docker/client/Dockerfile
container_name: votingsystem-client
volumes:
- ./client:/app
ports:
- "8080:8080"
stdin_open: true
tty: true
server:
build:
context: .
dockerfile: docker/server/Dockerfile
container_name: votingsystem-server
command: go run main.go
volumes:
- ./server:/go/src/github.com/xAyumux/TDUVotingSystem
ports:
- "8000:8000"
depends_on:
- db
db:
image: mysql:8.0
container_name: votingsystem-mysql
volumes:
- ./docker/db/initdb.d:/docker-entrypoint-initdb.d
- ./docker/db/my.cnf:/etc/mysql/conf.d/my.cnf
- ./db:/var/lib/mysql
env_file:
- ./docker/db/.env
environment:
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_ROOT_PASSWORD=${DB_PASS}
- TZ=${TZ}
ports:
- ${DB_PORT}:3306