-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (63 loc) · 1.51 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
version: '3.9'
services:
backend:
build:
context: ./docker
dockerfile: backend.Dockerfile
ports:
- '127.0.0.1:9000:9000'
volumes:
- ./backend:/go/src/myapp
command: "air"
depends_on:
db:
condition: service_healthy
environment:
TZ: Asia/Tokyo
frontend:
image: node:22
working_dir: /home/node/myapp
ports:
- '127.0.0.1:3000:3000'
volumes:
- ./frontend:/home/node/myapp
- /home/node/myapp/node_modules
command: "bash -c 'npm i && npm run dev'"
environment:
TZ: Asia/Tokyo
API_BASE_URL: http://backend:9000
db:
build:
context: ./docker
dockerfile: mysql.Dockerfile
volumes:
- ./docker/mysql:/var/lib/mysql
- ./mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./mysql/sql:/sqlscripts
ports:
- '127.0.0.1:3306:3306'
environment:
- MYSQL_DATABASE=training
- MYSQL_ROOT_PASSWORD=password
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 5s
retries: 10
swagger-editor:
image: swaggerapi/swagger-editor
container_name: "swagger-editor"
ports:
- "127.0.0.1:8001:8080"
volumes:
- ./docs/swagger.yaml:/swagger.yaml
environment:
SWAGGER_FILE: /swagger.yaml
swagger-ui:
image: swaggerapi/swagger-ui
container_name: "swagger-ui"
ports:
- "127.0.0.1:8002:8080"
volumes:
- ./docs/swagger.yaml:/swagger.yaml
environment:
SWAGGER_JSON: /swagger.yaml