-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (80 loc) · 1.98 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
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:
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: root
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./backend/db/mysql_data:/var/lib/mysql
ports:
- 3301:3306
backend:
build:
context: ./backend
args:
WORKDIR: app
dockerfile: Dockerfile
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- "./backend:/app"
environment:
TZ: Asia/Tokyo
RAILS_ENV: development
API_DOMAIN: "localhost:8000"
BASE_URL: "http://localhost:3000"
ports:
- "3000:3000"
depends_on:
- db
swagger:
build:
context: ./swagger
dockerfile: Dockerfile
working_dir: "/swagger"
volumes:
- "./swagger:/swagger"
redoc:
image: redocly/redoc:latest
ports:
- "8081:80"
volumes:
- "./swagger:/usr/share/nginx/html/swagger"
environment:
SPEC_URL: ./swagger/src/swagger.yml
swagger-ui:
image: swaggerapi/swagger-ui
container_name: "swagger-ui"
ports:
- "8002:8080"
volumes:
- "./swagger/src/swagger.yml:/usr/share/nginx/html/swagger/src/swagger.yml"
environment:
API_URL: ./swagger/src/swagger.yml
frontend:
build:
context: ./frontend
args:
WORKDIR: app
API_URL: "http://localhost:3000"
dockerfile: Dockerfile
command: sh -c 'npm install && npm run start'
environment:
- CHOKIDAR_USEPOLLING=true # Hot Reload を有効にする
volumes:
- "./frontend:/frontend"
ports:
- "8000:3000"
tty: true
depends_on:
- backend
openapi_typescript_axios:
image: openapitools/openapi-generator-cli:v6.0.1
volumes:
- "./frontend:/frontend"
command: generate -i ./swagger/src/swagger.yml -g typescript-axios -o ./frontend/src/types
depends_on:
- frontend
- swagger-ui
- swagger