-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.postgres.yaml
More file actions
53 lines (48 loc) · 1.2 KB
/
docker-compose.postgres.yaml
File metadata and controls
53 lines (48 loc) · 1.2 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
# PostgreSQL configuration for Fortress
# Use this when running with external PostgreSQL
version: '3.8'
services:
fortress:
build: .
container_name: fortress-backup
restart: unless-stopped
ports:
- "9001:9001"
environment:
- NODE_ENV=production
- DB_TYPE=postgres
- PG_HOST=postgres
- PG_PORT=5432
- PG_DATABASE=fortress
- PG_USER=fortress
- PG_PASSWORD=${PG_PASSWORD:-fortress-secure-password}
- JWT_SECRET=${JWT_SECRET:-fortress-change-me-in-production}
- PORT=9001
depends_on:
postgres:
condition: service_healthy
networks:
- fortress-network
postgres:
image: postgres:16-alpine
container_name: fortress-postgres
restart: unless-stopped
environment:
POSTGRES_DB: fortress
POSTGRES_USER: fortress
POSTGRES_PASSWORD: ${PG_PASSWORD:-fortress-secure-password}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- fortress-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U fortress" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres-data:
driver: local
networks:
fortress-network:
driver: bridge