-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (55 loc) · 1.12 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
version: '3'
services:
app:
build:
context: ./docker/app
args:
uid: ${APP_UID}
gid: ${APP_GID}
env_file: .env
environment:
PS1: '\u@\h:\w\$$ '
TZ: Asia/Tokyo
working_dir: /app
volumes:
- .:/app
- ./vendor/bundle:/usr/local/bundle
command: bash -c 'rm -f tmp/pids/server.pid; rails s -b 0.0.0.0'
depends_on:
- db
logging:
options:
max-size: 10m
max-file: '10'
db:
build:
context: ./docker/db
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_INITDB_ARGS: '--encoding=UTF-8 --locale=C'
TZ: Asia/Tokyo
volumes:
- db:/var/lib/postgresql/data
- ./backup:/backup
logging:
options:
max-size: 10m
max-file: '10'
web:
build:
context: ./docker/web
environment:
TZ: Asia/Tokyo
ports:
- '${PUBLISH_WEB_SERVER_PORT}:80'
volumes:
- ./log/nginx:/var/log/nginx
depends_on:
- app
logging:
options:
max-size: 10m
max-file: '10'
volumes:
db: