forked from harshumaretiya/tailview
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (62 loc) · 1.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
66 lines (62 loc) · 1.61 KB
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
services:
tailview_web:
image: tailview_web:${IMAGE_TAG:-latest}
build:
context: .
dockerfile: ./Dockerfile
args:
RAILS_ENV: production
restart: always
command: >
bash -c "rm -f /rails/tmp/pids/server.pid &&
bundle exec rails server -b 0.0.0.0 -p 3001 -e production"
env_file: .env.production
environment:
- RAILS_ENV=production
- RAILS_SERVE_STATIC_FILES=true
volumes:
- ./storage:/rails/storage
- ./log:/rails/log
- tailview_tmp_data:/rails/tmp
ports:
- "3001:3001"
depends_on:
- tailview_postgres
stdin_open: true
tty: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/up"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
networks:
- tailview_frontend
- tailview_backend
tailview_postgres:
image: postgres:15
restart: unless-stopped
env_file: .env.production
environment:
- POSTGRES_DB=${TAILVIEW_POSTGRES_DB:-tailview_production}
- POSTGRES_USER=${TAILVIEW_POSTGRES_USER:-tailview_user}
- POSTGRES_PASSWORD=${TAILVIEW_POSTGRES_PASSWORD:-YourStrongPassword123!@#}
volumes:
- tailview_pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${TAILVIEW_POSTGRES_USER:-tailview_user}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tailview_backend
networks:
tailview_frontend:
name: frontend
external: true
tailview_backend:
name: tailview_backend
internal: true
volumes:
tailview_pg_data:
tailview_tmp_data: