-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (40 loc) · 1.02 KB
/
docker-compose.yml
File metadata and controls
40 lines (40 loc) · 1.02 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
version: "3.9"
services:
db:
# コンテナ名の指定
container_name: subscription_db
# イメージの指定
image: postgres:14
# データの永続化
volumes:
- ./tmp/db:/var/lib/postgresql/data
# 環境変数の指定
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- '5432:5432'
web:
# コンテナ名の指定
container_name: subscription_app
# Dockerfile のあるディレクトリのパスを指定
build: .
# デフォルトのコマンド指定
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
# データの永続化
volumes:
- .:/subscription_app_back
# ポートの指定
ports:
- "3000:3000"
# 依存関係の指定
depends_on:
- db
mock-server:
image: stoplight/prism:3
container_name: "swagger-api"
ports:
- "4010:4010"
command: mock -h 0.0.0.0 /openapi.yml
volumes:
- ./docs/openapi.yml:/openapi.yml