-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.selfhost.yml
More file actions
64 lines (61 loc) · 2.42 KB
/
docker-compose.selfhost.yml
File metadata and controls
64 lines (61 loc) · 2.42 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
# docker-compose.selfhost.yml — Minimal self-hosted LynxPrompt deployment
# Usage: docker compose -f docker-compose.selfhost.yml up -d
#
# Required env vars (set in .env or environment):
# NEXTAUTH_SECRET — generate with: openssl rand -base64 32
# ADMIN_EMAIL — your email (auto-promoted to superadmin)
#
# Optional:
# DB_PASSWORD — database password (required, no default)
# APP_URL — your domain (default: http://localhost:3000)
services:
postgres:
image: postgres:18-alpine
restart: unless-stopped
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: lynxprompt
POSTGRES_USER: lynxprompt
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD must be set - generate with: openssl rand -hex 24}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U lynxprompt -d lynxprompt"]
interval: 5s
timeout: 5s
retries: 5
lynxprompt:
# Use the latest release tag from Docker Hub
# The CI pushes tags like: 2.0.0-<short_sha>
# Find available tags at: https://hub.docker.com/r/drumsergio/lynxprompt/tags
image: drumsergio/lynxprompt:2.0.0
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
depends_on:
postgres:
condition: service_healthy
environment:
# Single DB — password defined once, shared with Postgres container
DB_APP_HOST: postgres
DB_APP_USER: lynxprompt
DB_APP_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD must be set - generate with: openssl rand -hex 24}
DB_APP_NAME: lynxprompt
DB_USERS_HOST: postgres
DB_USERS_USER: lynxprompt
DB_USERS_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD must be set - generate with: openssl rand -hex 24}
DB_USERS_NAME: lynxprompt
DB_BLOG_HOST: postgres
DB_BLOG_USER: lynxprompt
DB_BLOG_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD must be set - generate with: openssl rand -hex 24}
DB_BLOG_NAME: lynxprompt
DB_SUPPORT_HOST: postgres
DB_SUPPORT_USER: lynxprompt
DB_SUPPORT_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD must be set - generate with: openssl rand -hex 24}
DB_SUPPORT_NAME: lynxprompt
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:?NEXTAUTH_SECRET must be set - generate with: openssl rand -base64 32}
NEXTAUTH_URL: ${APP_URL:-http://localhost:3000}
APP_URL: ${APP_URL:-http://localhost:3000}
SUPERADMIN_EMAIL: ${ADMIN_EMAIL:-}
NODE_ENV: production
volumes:
pgdata: