Compare commits

..
Author SHA1 Message Date
Mauricio SiuandClaude Fable 5 744ff52770 fix(kener): define REDIS_URL and drop unused databases
Kener v4 requires Redis for its BullMQ queues, caching and scheduler,
so the app crashed on startup with "REDIS_URL is not defined in
environment variables" right after printing that it was running
(issue #976). The template also spun up both a postgres and a mariadb
container while DATABASE_URL pointed at SQLite, so neither database
was ever used (issue #282).

Changes, aligned with the upstream docker-compose.yml
(rajnandan1/kener):

- Add a redis:7-alpine service with a healthcheck and persistent
  volume, wire REDIS_URL=redis://redis:6379 and make kener depend on
  redis being healthy
- Remove the unused postgres and mysql services plus their env vars
  and generated passwords; keep SQLite (upstream default) persisted
  in the kener_db volume
- Set ORIGIN to https://<domain> instead of http://localhost:3000 so
  CSRF protection works behind the generated domain
- Drop the stale /app/uploads bind mount (kener v4 only persists
  /app/database) and the obsolete compose version key

Deploy-tested on a Dokploy instance: migrations and seed complete,
schedulers start, "Kener version 4.1.2 is running!", HTTP 200 on the
generated domain, both containers stable.

Closes #976
Closes #282

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 10:56:19 -06:00
5 changed files with 102 additions and 62 deletions
+46 -13
View File
@@ -1,29 +1,58 @@
services:
db-migration:
depends_on:
db:
condition: service_healthy
image: infisical/infisical:v0.135.0-postgres
environment:
- NODE_ENV=production
- ENCRYPTION_KEY
- AUTH_SECRET
- SITE_URL
- DB_CONNECTION_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- SMTP_HOST
- SMTP_PORT
- SMTP_FROM_NAME
- SMTP_USERNAME
- SMTP_PASSWORD
- SMTP_SECURE=true
command: npm run migration:latest
pull_policy: always
backend:
image: infisical/infisical:v0.162.6
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
db-migration:
condition: service_completed_successfully
image: infisical/infisical:v0.135.0-postgres
pull_policy: always
environment:
- NODE_ENV=production
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- AUTH_SECRET=${AUTH_SECRET}
- SITE_URL=${SITE_URL}
- ENCRYPTION_KEY
- AUTH_SECRET
- SITE_URL
- DB_CONNECTION_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_FROM_ADDRESS=${SMTP_FROM_ADDRESS}
- SMTP_FROM_NAME=${SMTP_FROM_NAME}
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_HOST
- SMTP_PORT
- SMTP_FROM_NAME
- SMTP_USERNAME
- SMTP_PASSWORD
- SMTP_SECURE=true
redis:
image: redis:7.4.1
env_file: .env
restart: always
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- redis_infisical_data:/data
@@ -31,11 +60,12 @@ services:
image: postgres:14-alpine
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
volumes:
- pg_infisical_data:/var/lib/postgresql/data
healthcheck:
test: "pg_isready --username=${POSTGRES_USER} && psql --username=${POSTGRES_USER} --list"
interval: 5s
@@ -45,3 +75,6 @@ services:
volumes:
pg_infisical_data:
redis_infisical_data:
+1 -1
View File
@@ -1,7 +1,7 @@
{
"id": "infisical",
"name": "Infisical",
"version": "0.162.6",
"version": "0.135.0",
"description": "All-in-one platform to securely manage application configuration and secrets across your team and infrastructure.",
"logo": "infisical.jpg",
"links": {
+38 -9
View File
@@ -3,27 +3,56 @@ main_domain = "${domain}"
postgres_password = "${password}"
postgres_user = "infisical"
postgres_db = "infisical"
encryption_key = "${hash:32}"
auth_secret = "${base64:32}"
[config]
env = [
"ENCRYPTION_KEY=${encryption_key}",
"AUTH_SECRET=${auth_secret}",
"ENCRYPTION_KEY=6c1fe4e407b8911c104518103505b218",
"AUTH_SECRET=5lrMXKKWCVocS/uerPsl7V+TX/aaUaI7iDkgl3tSmLE=",
"POSTGRES_PASSWORD=${postgres_password}",
"POSTGRES_USER=${postgres_user}",
"POSTGRES_DB=${postgres_db}",
"SITE_URL=http://${main_domain}",
"SITE_URL=http://${main_domain}:8080",
"SMTP_HOST=",
"SMTP_PORT=587",
"SMTP_FROM_ADDRESS=",
"SMTP_FROM_NAME=Infisical",
"SMTP_PORT=",
"SMTP_NAME=",
"SMTP_USERNAME=",
"SMTP_PASSWORD=",
"CLIENT_ID_HEROKU=",
"CLIENT_ID_VERCEL=",
"CLIENT_ID_NETLIFY=",
"CLIENT_ID_GITHUB=",
"CLIENT_ID_GITHUB_APP=",
"CLIENT_SLUG_GITHUB_APP=",
"CLIENT_ID_GITLAB=",
"CLIENT_ID_BITBUCKET=",
"CLIENT_SECRET_HEROKU=",
"CLIENT_SECRET_VERCEL=",
"CLIENT_SECRET_NETLIFY=",
"CLIENT_SECRET_GITHUB=",
"CLIENT_SECRET_GITHUB_APP=",
"CLIENT_SECRET_GITLAB=",
"CLIENT_SECRET_BITBUCKET=",
"CLIENT_SLUG_VERCEL=",
"CLIENT_PRIVATE_KEY_GITHUB_APP=",
"CLIENT_APP_ID_GITHUB_APP=",
"SENTRY_DSN=",
"POSTHOG_HOST=",
"POSTHOG_PROJECT_API_KEY=",
"CLIENT_ID_GOOGLE_LOGIN=",
"CLIENT_SECRET_GOOGLE_LOGIN=",
"CLIENT_ID_GITHUB_LOGIN=",
"CLIENT_SECRET_GITHUB_LOGIN=",
"CLIENT_ID_GITLAB_LOGIN=",
"CLIENT_SECRET_GITLAB_LOGIN=",
"CAPTCHA_SECRET=",
"NEXT_PUBLIC_CAPTCHA_SITE_KEY=",
"PLAIN_API_KEY=",
"PLAIN_WISH_LABEL_IDS=",
"SSL_CLIENT_CERTIFICATE_HEADER_KEY=",
]
mounts = []
[[config.domains]]
serviceName = "backend"
port = 8080
port = 8_080
host = "${main_domain}"
+15 -19
View File
@@ -1,39 +1,35 @@
version: "3.8"
services:
kener:
image: rajnandan1/kener:latest
environment:
- TZ=${TZ}
- KENER_SECRET_KEY=${KENER_SECRET_KEY} # 🔐 API key / secret
- ORIGIN=${ORIGIN}
- REDIS_URL=${REDIS_URL}
- DATABASE_URL=${DATABASE_URL}
- KENER_BASE_PATH=${KENER_BASE_PATH}
- ORIGIN=${ORIGIN}
- RESEND_API_KEY=${RESEND_API_KEY} # 🔐 API key
- RESEND_SENDER_EMAIL=${RESEND_SENDER_EMAIL}
ports:
- 3000
volumes:
- kener_db:/app/database
- ../files/uploads:/app/uploads
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:alpine
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # 🔐 DB password
- POSTGRES_DB=${POSTGRES_DB}
restart: unless-stopped
mysql:
image: mariadb:11
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD} # 🔐 DB password
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_RANDOM_ROOT_PASSWORD=true
redis:
image: redis:7-alpine
volumes:
- kener_redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
kener_db: {}
kener_redis: {}
+2 -20
View File
@@ -1,8 +1,6 @@
[variables]
main_domain = "${domain}"
KENER_SECRET_KEY = "${password:64}"
POSTGRES_PASSWORD = "${password:32}"
MYSQL_PASSWORD = "${password:32}"
[config]
[[config.domains]]
@@ -13,25 +11,9 @@ host = "${main_domain}"
[config.env]
TZ = "Etc/UTC"
KENER_SECRET_KEY = "${KENER_SECRET_KEY}" # 🔐 API key / secret
ORIGIN = "https://${main_domain}"
REDIS_URL = "redis://redis:6379"
DATABASE_URL = "sqlite://./database/kener.sqlite.db"
KENER_BASE_PATH = ""
ORIGIN = "http://localhost:3000"
RESEND_API_KEY = ""
RESEND_SENDER_EMAIL = "Accounts <accounts@resend.dev>"
POSTGRES_USER = "user"
POSTGRES_DB = "kener_db"
MYSQL_USER = "user"
MYSQL_DATABASE = "kener_db"
MYSQL_RANDOM_ROOT_PASSWORD = "true"
MYSQL_PASSWORD = "${MYSQL_PASSWORD}" # 🔐 DB password
POSTGRES_PASSWORD = "${POSTGRES_PASSWORD}" # 🔐 DB password
[[config.mounts]]
type = "volume"
source = "kener_db"
target = "/app/database"
[[config.mounts]]
type = "bind"
source = "../files/uploads"
target = "/app/uploads"