forked from kaishuu0123/rebacklogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (58 loc) · 1.55 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
version: '3'
services:
db:
restart: always
image: postgres:9.6-alpine
networks:
- internal_network
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
volumes:
- ./docker-volumes/postgres:/var/lib/postgresql/data
redis:
restart: always
image: redis:5.0-alpine
networks:
- internal_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
volumes:
- ./docker-volumes/redis:/data
# es:
# restart: always
# image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.1.3
# environment:
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# networks:
# - internal_network
# healthcheck:
# test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
# volumes:
# - ./elasticsearch:/usr/share/elasticsearch/data
app:
build: .
image: kaishuu0123/rebacklogs
restart: always
command: dockerize -wait tcp://db:5432 bash -c "rm -f /opt/rebacklogs/tmp/pids/server.pid; bundle exec rails db:prepare; bundle exec rails s -p 3000"
environment:
- DB_HOST=db
- DB_USER=postgres
- DB_NAME=rebacklogs
- DB_PORT=5432
networks:
- external_network
- internal_network
healthcheck:
test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
ports:
- "127.0.0.1:3000:3000"
depends_on:
- db
- redis
# - es
volumes:
- ./docker-volumes/rebacklogs/storage:/rebacklogs/storage
networks:
external_network:
internal_network:
internal: true