-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (79 loc) · 2.33 KB
/
docker-compose.yml
File metadata and controls
91 lines (79 loc) · 2.33 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-linkforty}
POSTGRES_USER: ${POSTGRES_USER:-linkforty}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-linkforty}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
linkforty:
# Use published image (recommended for production)
image: linkforty/core:latest
# OR build from source (for development)
# Uncomment the lines below and comment out the 'image:' line above
# build:
# context: .
# dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
# Database configuration
DATABASE_URL: postgresql://${POSTGRES_USER:-linkforty}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-linkforty}?sslmode=disable
# Redis configuration
REDIS_URL: redis://redis:6379
# Server configuration
NODE_ENV: ${NODE_ENV:-production}
PORT: ${PORT:-3000}
HOST: ${HOST:-0.0.0.0}
# Optional: JWT secret for authentication
# JWT_SECRET: ${JWT_SECRET}
# Optional: Email configuration
# SMTP_HOST: ${SMTP_HOST}
# SMTP_PORT: ${SMTP_PORT}
# SMTP_USER: ${SMTP_USER}
# SMTP_PASS: ${SMTP_PASS}
# EMAIL_FROM: ${EMAIL_FROM}
ports:
- "${LINKFORTY_PORT:-3000}:3000"
restart: unless-stopped
# Health check (optional, uncomment if needed)
# healthcheck:
# test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 40s
volumes:
postgres_data:
driver: local
redis_data:
driver: local
# Optional: Add network configuration for isolation
# networks:
# linkforty:
# driver: bridge