-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (56 loc) · 1.19 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
version: '3'
services:
api:
build:
context: .
dockerfile: ./docker/api/Dockerfile
expose:
- 3000
volumes:
- ./packages/api:/app:cached
- bundle:/bundle:cached
- bundle_cache:/app/tmp/cache:cached
- storage:/app/storage:cached
- rubocop_cache:/root/.cache/rubocop_cache:cached
stdin_open: true
tty: true
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -b '0.0.0.0'"
environment:
RAILS_ENV: development
BOOTSNAP_CACHE_DIR: /bundle/bootsnap
EDITOR: vi
depends_on:
- db
- redis
db:
image: postgres:13-alpine
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_INITDB_ARGS: '--encoding=UTF-8 --locale=ja_JP.UTF-8'
TZ: Asia/Tokyo
redis:
image: redis:6-alpine
expose:
- 6379
volumes:
- redis:/data
nginx:
image: nginx:stable-alpine
ports:
- 7100:7100
volumes:
- ./docker/nginx:/etc/nginx/conf.d
depends_on:
- api
volumes:
bundle:
bundle_cache:
rubocop_cache:
storage:
postgres:
redis: