This repository has been archived by the owner on Jun 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
93 lines (84 loc) · 1.92 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
88
89
90
91
92
93
---
version: "3.7"
# Avoid building these, but make them available as references.
x-disabled:
app: &app
build:
context: .
target: development
tmpfs:
- /tmp
backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app:cached
- bundle:/usr/local/bundle
- .psqlrc:/root/.psqlrc:ro
- node_modules:/app/node_modules
- packs:/app/public/packs
- rails_cache:/app/tmp/cache
environment:
- BOOTSNAP_CACHE_DIR=/bundle/bootsnap
- DATABASE_URL
- HISTFILE=/app/log/.bash_history
- NODE_ENV=${NODE_ENV:-development}
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- PSQL_HISTFILE=/app/log/.psql_history
- RAILS_ENV=${RAILS_ENV:-development}
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
depends_on:
- postgres
- redis
services:
runner:
<<: *backend
command: /bin/true
restart: "no"
rails:
<<: *backend
command: bundle exec rails server -b 0.0.0.0
ports:
- "3000:3000"
- "3035:3035"
resque:
<<: *backend
command: env QUEUE=* bundle exec rake resque:work
spring:
<<: *backend
command: /bin/bash -c "bundle exec spring server > /dev/null"
postgres:
image: postgres:11-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- PSQL_HISTFILE=/root/log/.psql_history
volumes:
- .psqlrc:/root/.psqlrc:ro
- postgres:/var/lib/postgresql/data
- ./log:/root/log:cached
healthcheck:
test: pg_isready -U root -h 127.0.0.1
interval: 1s
redis:
image: redis:5-alpine
ports:
- "6379:6379"
volumes:
- redis:/data
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 30
volumes:
bundle:
node_modules:
postgres:
rails_cache:
redis:
packs: