Compare commits

..
Author SHA1 Message Date
Mauricio SiuandClaude Fable 5 3ddbdde081 feat: add SpacetimeDB template
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:30:17 -06:00
8 changed files with 105 additions and 31 deletions
+13
View File
@@ -0,0 +1,13 @@
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
@@ -0,0 +1,45 @@
# 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.

After

Width:  |  Height:  |  Size: 3.6 KiB

+17
View File
@@ -0,0 +1,17 @@
{
"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
@@ -0,0 +1,8 @@
[variables]
main_domain = "${domain}"
[config]
[[config.domains]]
serviceName = "spacetimedb"
port = 3000
host = "${main_domain}"
+18 -19
View File
@@ -1,7 +1,9 @@
version: '3.8'
services:
zitadel:
restart: 'always'
image: 'ghcr.io/zitadel/zitadel:v4.16.0'
image: 'ghcr.io/zitadel/zitadel:latest'
command: 'start-from-init --masterkey "${ZITADEL_MASTERKEY}" --tlsMode disabled'
environment:
# Database Configuration
@@ -15,37 +17,33 @@ services:
ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD: "${POSTGRES_PASSWORD}"
ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE: disable
# External access configuration. These MUST match the domain configured
# in the Domains tab and the scheme/port it is served on, otherwise
# Zitadel answers {"code":5,"message":"Not Found"}.
# HTTP -> ZITADEL_EXTERNALPORT=80, ZITADEL_EXTERNALSECURE=false
# HTTPS -> ZITADEL_EXTERNALPORT=443, ZITADEL_EXTERNALSECURE=true
ZITADEL_EXTERNALDOMAIN: "${ZITADEL_EXTERNALDOMAIN}"
ZITADEL_EXTERNALPORT: "${ZITADEL_EXTERNALPORT}"
ZITADEL_EXTERNALSECURE: "${ZITADEL_EXTERNALSECURE}"
# External Configuration for HTTP only - TLS mode disabled
ZITADEL_EXTERNALSECURE: false
ZITADEL_EXTERNALPORT: 8080
ZITADEL_EXTERNALDOMAIN: "${EXTERNAL_DOMAIN}"
ZITADEL_TLS_ENABLED: false
# Disable Email Notifications
ZITADEL_NOTIFICATIONS_SMTP_HOST: ""
ZITADEL_NOTIFICATIONS_SMTP_PORT: ""
# Custom Admin User Configuration
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME: "${ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME}"
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD: "${ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD}"
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL_ADDRESS: "${ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL_ADDRESS}"
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_FIRSTNAME: "${ZITADEL_FIRSTINSTANCE_ORG_HUMAN_FIRSTNAME}"
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_LASTNAME: "${ZITADEL_FIRSTINSTANCE_ORG_HUMAN_LASTNAME}"
# Use the login UI built into the API container (no extra login-v2 service needed)
# Default Instance Features
ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED: false
healthcheck:
test: ["CMD", "/app/zitadel", "ready"]
interval: '10s'
timeout: '30s'
retries: 12
start_period: '30s'
depends_on:
db:
condition: 'service_healthy'
expose:
- 8080
ports:
- '8080'
volumes:
- zitadel_data:/app/data
db:
restart: 'always'
@@ -65,3 +63,4 @@ services:
volumes:
postgres_data:
zitadel_data:
+1 -1
View File
@@ -1,7 +1,7 @@
{
"id": "zitadel",
"name": "Zitadel",
"version": "4.16.0",
"version": "latest",
"description": "Open-source identity and access management platform with multi-tenancy, OpenID Connect, SAML, and OAuth 2.0 support.",
"logo": "zitadel.png",
"links": {
+3 -11
View File
@@ -7,8 +7,6 @@ admin_email = "${email}"
admin_password = "AdminPassword123!"
[config]
mounts = []
[[config.domains]]
serviceName = "zitadel"
port = 8080
@@ -18,15 +16,7 @@ path = "/"
[config.env]
POSTGRES_PASSWORD = "${postgres_password}"
ZITADEL_MASTERKEY = "${zitadel_masterkey}"
# ZITADEL_EXTERNALDOMAIN must always match the domain configured in the
# Domains tab. If you change the domain, update this variable too (and do it
# BEFORE the first deploy — Zitadel binds its instance to this domain on
# first start). For a domain served over HTTPS set ZITADEL_EXTERNALPORT=443
# and ZITADEL_EXTERNALSECURE=true.
ZITADEL_EXTERNALDOMAIN = "${main_domain}"
ZITADEL_EXTERNALPORT = "80"
ZITADEL_EXTERNALSECURE = "false"
EXTERNAL_DOMAIN = "${main_domain}"
# Custom Admin User Configuration
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME = "${admin_username}"
@@ -34,3 +24,5 @@ ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD = "${admin_password}"
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL_ADDRESS = "${admin_email}"
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_FIRSTNAME = "Admin"
ZITADEL_FIRSTINSTANCE_ORG_HUMAN_LASTNAME = "User"
[[config.mounts]]