diff --git a/blueprints/brightbean-studio/brightbean-studio.svg b/blueprints/brightbean-studio/brightbean-studio.svg new file mode 100644 index 000000000..065d46d61 --- /dev/null +++ b/blueprints/brightbean-studio/brightbean-studio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/blueprints/brightbean-studio/docker-compose.yml b/blueprints/brightbean-studio/docker-compose.yml new file mode 100644 index 000000000..e426a0c51 --- /dev/null +++ b/blueprints/brightbean-studio/docker-compose.yml @@ -0,0 +1,95 @@ +# Dokploy blueprint for Brightbean Studio +# https://github.com/brightbeanxyz/brightbean-studio +# +# Stack: Django app (gunicorn) + background-task worker + PostgreSQL 16. +# The public edge (Caddy in the upstream compose) is intentionally dropped: +# Dokploy's Traefik terminates TLS and routes to `app:8000`. +# +# Images are built from source on deploy (the project publishes no image yet). +# Swap the anchor below to your own fork to deploy your fork: +# x-brightbean-repo: &brightbean-repo https://github.com/H54collective/brightbean-studio.git#main + +x-brightbean-repo: &brightbean-repo https://github.com/brightbeanxyz/brightbean-studio.git#main + +services: + postgres: + image: postgres:16-alpine + restart: unless-stopped + environment: + POSTGRES_DB: brightbean + POSTGRES_USER: postgres + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + volumes: + - postgres_data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres -d brightbean"] + interval: 5s + timeout: 5s + retries: 10 + + migrate: + build: + context: *brightbean-repo + command: python manage.py migrate --noinput + restart: "no" + environment: + DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE} + SECRET_KEY: ${SECRET_KEY} + ENCRYPTION_KEY_SALT: ${ENCRYPTION_KEY_SALT} + DATABASE_URL: ${DATABASE_URL} + ALLOWED_HOSTS: ${ALLOWED_HOSTS} + APP_URL: ${APP_URL} + STORAGE_BACKEND: ${STORAGE_BACKEND} + MEDIA_ROOT: ${MEDIA_ROOT} + SERVE_MEDIA: ${SERVE_MEDIA} + depends_on: + postgres: + condition: service_healthy + + app: + build: + context: *brightbean-repo + command: gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 2 --threads 4 + restart: unless-stopped + expose: + - "8000" + environment: + DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE} + SECRET_KEY: ${SECRET_KEY} + ENCRYPTION_KEY_SALT: ${ENCRYPTION_KEY_SALT} + DATABASE_URL: ${DATABASE_URL} + ALLOWED_HOSTS: ${ALLOWED_HOSTS} + APP_URL: ${APP_URL} + STORAGE_BACKEND: ${STORAGE_BACKEND} + MEDIA_ROOT: ${MEDIA_ROOT} + SERVE_MEDIA: ${SERVE_MEDIA} + volumes: + - media_data:/app/media + depends_on: + migrate: + condition: service_completed_successfully + + worker: + build: + context: *brightbean-repo + command: python manage.py process_tasks + restart: unless-stopped + environment: + DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE} + SECRET_KEY: ${SECRET_KEY} + ENCRYPTION_KEY_SALT: ${ENCRYPTION_KEY_SALT} + DATABASE_URL: ${DATABASE_URL} + ALLOWED_HOSTS: ${ALLOWED_HOSTS} + APP_URL: ${APP_URL} + STORAGE_BACKEND: ${STORAGE_BACKEND} + MEDIA_ROOT: ${MEDIA_ROOT} + SERVE_MEDIA: ${SERVE_MEDIA} + volumes: + - media_data:/app/media + depends_on: + migrate: + condition: service_completed_successfully + +volumes: + postgres_data: + media_data: \ No newline at end of file diff --git a/blueprints/brightbean-studio/meta.json b/blueprints/brightbean-studio/meta.json new file mode 100644 index 000000000..454755114 --- /dev/null +++ b/blueprints/brightbean-studio/meta.json @@ -0,0 +1,18 @@ +{ + "id": "brightbean-studio", + "name": "Brightbean Studio", + "version": "latest", + "description": "Open-source, self-hostable social media management platform: schedule, publish and manage content across 10+ platforms (Facebook, Instagram, LinkedIn, TikTok, YouTube, Pinterest, Threads, Bluesky, Mastodon, Google Business, DEV.to) from a single dashboard. Free alternative to Buffer, Sendible and SocialPilot.", + "logo": "brightbean-studio.svg", + "links": { + "github": "https://github.com/brightbeanxyz/brightbean-studio", + "website": "https://brightbean.xyz/studio/", + "docs": "https://github.com/brightbeanxyz/brightbean-studio#readme" + }, + "tags": [ + "social-media", + "django", + "self-hosted", + "marketing" + ] +} \ No newline at end of file diff --git a/blueprints/brightbean-studio/template.toml b/blueprints/brightbean-studio/template.toml new file mode 100644 index 000000000..db7918012 --- /dev/null +++ b/blueprints/brightbean-studio/template.toml @@ -0,0 +1,66 @@ +# Dokploy template for Brightbean Studio +# - The app is built from source at deploy time (no prebuilt image yet). +# - After first deploy, add per-platform credentials (Facebook, LinkedIn, +# TikTok, ...) in Django admin: /admin/ -> Platform credentials, or set the +# PLATFORM_* env vars on the compose service in Dokploy. + +[variables] +main_domain = "${domain}" +postgres_password = "${password:32}" +secret_key = "${password:50}" +encryption_key_salt = "${password:32}" + +[config] + +[[config.domains]] +serviceName = "app" +port = 8000 +host = "${main_domain}" +path = "/" + +[config.env] +DJANGO_SETTINGS_MODULE = "config.settings.production" +SECRET_KEY = "${secret_key}" +ENCRYPTION_KEY_SALT = "${encryption_key_salt}" +POSTGRES_PASSWORD = "${postgres_password}" +DATABASE_URL = "postgres://postgres:${postgres_password}@postgres:5432/brightbean" +ALLOWED_HOSTS = "${main_domain}" +APP_URL = "https://${main_domain}" +STORAGE_BACKEND = "local" +MEDIA_ROOT = "/app/media" +SERVE_MEDIA = "true" + +[[config.mounts]] +filePath = "README.md" +content = """ +# Brightbean Studio (Dokploy template) + +Open-source social media management: schedule, publish and manage content +across 10+ platforms from one dashboard (Buffer/Sendible alternative). + +## After deploying + +1. **Admin** — create your superuser once the stack is up: + `docker exec -it python manage.py createsuperuser` + (or open https:///admin/ and use a first-login flow if enabled). +2. **Platform credentials** (Facebook, Instagram, LinkedIn, TikTok, YouTube, + Pinterest, Threads, Bluesky, Google Business, Mastodon, DEV.to): add them in + Django admin under *Platform credentials*, or set the `PLATFORM_*` env vars + on this compose service in Dokploy and redeploy. +3. **Media storage** — default is local disk on the `media_data` volume + (served by Django via SERVE_MEDIA=true at /media/). To move to S3, set + `STORAGE_BACKEND=s3` plus `S3_*` vars and set `SERVE_MEDIA=false`. +4. **Email** — set `EMAIL_HOST` / `EMAIL_HOST_USER` / `EMAIL_HOST_PASSWORD` / + `DEFAULT_FROM_EMAIL` if you want password resets and notifications. +5. **Google login** — set `GOOGLE_AUTH_CLIENT_ID` / `GOOGLE_AUTH_CLIENT_SECRET` + for Google sign-in. + +## Notes + +- The image is built from source on every deploy (takes a few minutes the + first time). The three services share the same Dockerfile, so only the + first build pays the full cost. +- `migrate` is a one-shot service: it runs Django migrations, then exits. + `app` and `worker` wait for it via `service_completed_successfully`. +- Traefik (Dokploy) handles TLS; the upstream Caddy edge is not used. +""" \ No newline at end of file