-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (38 loc) · 1.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
41 lines (38 loc) · 1.07 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
# Local development. Production is one Railway service plus managed Postgres and
# Redis; this file exists so a laptop gets the same three moving parts.
services:
app:
build: .
ports: ['3000:3000']
environment:
NODE_ENV: development
PORT: 3000
SITE_URL: http://localhost:3000
DATABASE_URL: postgres://tipoff:tipoff@db:5432/tipoff
REDIS_URL: redis://redis:6379
ROLES: web,worker
env_file: [.env]
depends_on:
db: { condition: service_healthy }
redis: { condition: service_started }
volumes: ['./:/app', '/app/node_modules']
db:
image: postgres:18-alpine
environment:
POSTGRES_USER: tipoff
POSTGRES_PASSWORD: tipoff
POSTGRES_DB: tipoff
ports: ['5432:5432']
volumes: ['pgdata:/var/lib/postgresql/data']
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U tipoff']
interval: 5s
retries: 10
redis:
image: redis:8-alpine
command: ['redis-server', '--appendonly', 'yes']
ports: ['6379:6379']
volumes: ['redisdata:/data']
volumes:
pgdata:
redisdata: