-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (68 loc) · 1.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (68 loc) · 1.41 KB
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
version: "3"
services:
app:
container_name: tech-guide-deploy
build:
context: ./backend
dockerfile: Dockerfile
target: deploy
ports:
- "80:8080"
depends_on:
- db
- redis
command: ./main
dev:
container_name: tech-guide-develop
build:
context: ./backend
dockerfile: Dockerfile.dev
target: develop
ports:
- "8080:8080"
depends_on:
- db
- redis
volumes:
- ./backend:/app
scheduler:
container_name: tech-guide-scheduler
build:
context: ./scheduler
dockerfile: Dockerfile
target: deploy
ports:
- "80:8080"
command: ./main
db:
container_name: tech-guide-db
build:
context: ./backend
dockerfile: Dockerfile.db
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: mydb
MYSQL_USER: kazuki
MYSQL_PASSWORD: secret
TZ: Asia/Tokyo
restart: always
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- type: volume
source: tech-guide-volume
target: /var/lib/mysql
redis:
container_name: tech-guide-redis
image: redis:latest
restart: always
ports:
- "6379:6379"
volumes:
- type: volume
source: tech-guide-volume
target: /data
volumes:
tech-guide-volume:
name: tech-guide-mysql