-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
81 lines (75 loc) · 1.96 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
version: "3"
services:
app:
image: ghcr.io/kaishuu0123/rebacklogs:latest
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_PASS=postgres
- DB_PORT=5432
# - SECRET_KEY_BASE=secret_key_base_rebacklogs
# - GOOGLE_OAUTH_KEY=google_oauth_key
# - GOOGLE_OAUTH_SECRET=google_oauth_secret
# - GITHUB_OAUTH_KEY=github_oauth_key
# - GITHUB_OAUTH_SECRET=github_oauth_secret
networks:
- external_network
- internal_network
healthcheck:
test:
[
"CMD-SHELL",
"wget -q --spider --proxy=off localhost:3000/health || exit 1",
]
ports:
- "3000:3000"
depends_on:
- db
- redis
# - es
volumes:
- app-storage:/rebacklogs/storage
db:
restart: always
image: postgres:16.3
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
networks:
- internal_network
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
restart: always
image: redis:5.0-alpine
networks:
- internal_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
volumes:
- redis-data:/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
networks:
external_network:
internal_network:
internal: true
volumes:
postgres-data:
app-storage:
redis-data: