-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
135 lines (124 loc) · 3.66 KB
/
docker-compose.yml
File metadata and controls
135 lines (124 loc) · 3.66 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Docker Compose automatically loads .env file from the same directory
# Copy .env.example to .env and configure your settings
services:
# GameRequest Application
ggrequestz:
# Use pre-built image by default, fall back to local build if needed
image: ghcr.io/xtreemmak/ggrequestz:latest
build:
context: .
args:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
container_name: ggrequestz-app
restart: unless-stopped
ports:
- "${APP_PORT:-3000}:3000"
environment:
# User/Group IDs for file permissions
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
TZ: ${TZ:-UTC}
# Database Configuration
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
# Authentication
AUTH_METHOD: ${AUTH_METHOD}
AUTHENTIK_CLIENT_ID: ${AUTHENTIK_CLIENT_ID:-}
AUTHENTIK_CLIENT_SECRET: ${AUTHENTIK_CLIENT_SECRET:-}
AUTHENTIK_ISSUER: ${AUTHENTIK_ISSUER:-}
SESSION_SECRET: ${SESSION_SECRET}
# IGDB API (required)
IGDB_CLIENT_ID: ${IGDB_CLIENT_ID}
IGDB_CLIENT_SECRET: ${IGDB_CLIENT_SECRET}
# Redis Cache (optional - falls back to memory if not available)
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
# Optional External Services
GOTIFY_URL: ${GOTIFY_URL:-}
GOTIFY_TOKEN: ${GOTIFY_TOKEN:-}
ROMM_SERVER_URL: ${ROMM_SERVER_URL:-}
ROMM_USERNAME: ${ROMM_USERNAME:-}
ROMM_PASSWORD: ${ROMM_PASSWORD:-}
N8N_WEBHOOK_URL: ${N8N_WEBHOOK_URL:-}
# Application Configuration
PM2_INSTANCES: ${PM2_INSTANCES:-max}
NODE_ENV: production
AUTO_MIGRATE: ${AUTO_MIGRATE:-true}
PUBLIC_SITE_URL: ${PUBLIC_SITE_URL:-http://localhost:3000}
volumes:
- ggrequestz-logs:/app/logs
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- ggrequestz-network
healthcheck:
test: ["CMD", "node", "/app/scripts/healthcheck.cjs"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: ggrequestz-postgres
restart: unless-stopped
# Local PostgreSQL for testing
environment:
POSTGRES_DB: ggrequestz
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme123}
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "${POSTGRES_EXTERNAL_PORT:-5432}:5432"
networks:
- ggrequestz-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d ggrequestz"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Redis Cache
redis:
image: redis:7-alpine
container_name: ggrequestz-redis
restart: unless-stopped
# Local Redis cache for testing
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
environment:
REDIS_REPLICATION_MODE: master
volumes:
- redis-data:/data
ports:
- "${REDIS_EXTERNAL_PORT:-6380}:6379"
networks:
- ggrequestz-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 10s
volumes:
postgres-data:
driver: local
redis-data:
driver: local
gotify-data:
driver: local
ggrequestz-logs:
driver: local
traefik-letsencrypt:
driver: local
networks:
ggrequestz-network:
driver: bridge
name: ggrequestz-network