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
7 changed files with 17 additions and 122 deletions
+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"
-13
View File
@@ -1,13 +0,0 @@
version: "3.8"
services:
spacetimedb:
image: clockworklabs/spacetime:v2.6.1
restart: unless-stopped
command: start
ports:
- 3000
volumes:
- spacetimedb-data:/home/spacetime
volumes:
spacetimedb-data: {}
-45
View File
@@ -1,45 +0,0 @@
# SpacetimeDB
SpacetimeDB is a database and server runtime in one: your clients connect directly to the database and your application logic runs inside it as WebAssembly modules. There is no web UI — the domain assigned to this service exposes the SpacetimeDB HTTP/WebSocket API (so opening `/` in a browser returns a plain 404; that is expected).
## Verify the server is running
```bash
curl -i https://your-domain.com/v1/ping
```
A `200 OK` response means the server is up.
## Connect with the SpacetimeDB CLI
1. Install the CLI on your local machine:
```bash
curl -sSf https://install.spacetimedb.com | sh
```
2. Register your Dokploy instance as a server and make it the default:
```bash
spacetime server add --url https://your-domain.com dokploy --default
```
3. Log in (or create an anonymous local identity) and publish a module:
```bash
spacetime login
spacetime publish --server dokploy my-database
```
4. Check connectivity at any time:
```bash
spacetime server ping dokploy
```
From your game or app, connect with any SpacetimeDB client SDK (Rust, C#, TypeScript) using `https://your-domain.com` as the host URI. See the [getting started guide](https://spacetimedb.com/docs/getting-started) for a full walkthrough.
## Notes
- All server state (databases, logs and the JWT signing keys used for identities) is persisted in the `spacetimedb-data` volume, so identities survive restarts and upgrades.
- Client connections use WebSockets over the same domain; no extra configuration is needed.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

-17
View File
@@ -1,17 +0,0 @@
{
"id": "spacetimedb",
"name": "SpacetimeDB",
"version": "v2.6.1",
"description": "SpacetimeDB is a relational database with a built-in server runtime. Clients connect directly to the database and run server-side logic (modules) inside it, making it ideal for real-time multiplayer games, chat and collaborative applications without a separate backend.",
"logo": "logo.png",
"links": {
"github": "https://github.com/clockworklabs/SpacetimeDB",
"website": "https://spacetimedb.com/",
"docs": "https://spacetimedb.com/docs"
},
"tags": [
"database",
"realtime",
"backend"
]
}
-8
View File
@@ -1,8 +0,0 @@
[variables]
main_domain = "${domain}"
[config]
[[config.domains]]
serviceName = "spacetimedb"
port = 3000
host = "${main_domain}"