-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-staging.yml
47 lines (45 loc) · 1.12 KB
/
docker-compose-staging.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
version: '3.8'
services:
ecs_app:
build:
context: .
dockerfile: ./docker/staging/rails/Dockerfile
command: >
bash -c "rm -rf tmp/pids/server.pid &&
bundle exec puma"
volumes:
- .:/usr/src/app/:cached
# nginx から sockets を扱えるようにマウントする
- web-sockets-data:/usr/src/app/tmp/sockets
environment:
DB_HOST: "${DB_HOST}"
REDIS: "${REDIS}"
tty: true
stdin_open: true
ecs_web:
build:
context: .
dockerfile: ./docker/staging/nginx/Dockerfile
volumes:
- web-sockets-data:/usr/src/app/tmp/sockets
ports:
- "80:80"
depends_on:
- ecs_app
ecs_worker:
build:
context: .
dockerfile: ./docker/staging/rails/Dockerfile
command: bundle exec sidekiq
volumes:
- .:/usr/src/app/:cached
environment:
DB_HOST: "${DB_HOST}"
REDIS: "${REDIS}"
# コンテナ永続させる
# https://zenn.dev/hohner/articles/43a0da20181d34
tty: true
# 標準入出力とエラー出力をコンテナに結びつける
stdin_open: true
volumes:
web-sockets-data: