-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
46 lines (46 loc) · 1006 Bytes
/
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
version: "3.9"
# ref: https://docs.docker.com/compose/compose-file
services:
app:
image: gotodo
build:
args:
- target=dev
environment:
TODO_ENV: dev
PORT: 8080
TODO_DB_HOST: todo-db
TODO_DB_PORT: 3306
TODO_DB_USER: todo
TODO_DB_PASSWORD: todo
TODO_DB_NAME: todo
TODO_REDIS_HOST: todo-redis
TODO_REDIS_PORT: 6379
volumes:
- .:/app
ports:
- "18000:8080"
todo-db:
image: mysql:8.0.29
platform: linux/amd64
container_name: todo-db
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: todo
MYSQL_PASSWORD: todo
MYSQL_DATABASE: todo
volumes:
- todo-db-data:/var/lib/mysql
- $PWD/_tools/mysql/conf.d:/etc/mysql/conf.d:cached
ports:
- "33306:3306"
todo-redis:
image: "redis:latest"
container_name: todo-redis
ports:
- "36379:6379"
volumes:
- todo-redis-data:/data
volumes:
todo-db-data:
todo-redis-data: