Add Posse-Party deployment configuration with Dokploy/Traefik integration
This commit is contained in:
153
POSSE_PARTY_README.md
Normal file
153
POSSE_PARTY_README.md
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
# Posse-Party Deployment Guide
|
||||||
|
|
||||||
|
**Posse-Party** - POSSE (Publish on Own Site, Syndicate Elsewhere) platform for managing your social media presence.
|
||||||
|
|
||||||
|
## What is Posse-Party?
|
||||||
|
|
||||||
|
Posse-Party helps you:
|
||||||
|
- **Publish** content on your own website/platform
|
||||||
|
- **Syndicate** to other social media platforms (Twitter/X, Mastodon, LinkedIn, etc.)
|
||||||
|
- **Own** your content while still reaching audiences on other platforms
|
||||||
|
- **Cross-post** automatically to multiple platforms at once
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
### 1. Generate Secret Key
|
||||||
|
|
||||||
|
```bash
|
||||||
|
openssl rand -hex 64
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy this value - you'll need it for `SECRET_KEY_BASE`.
|
||||||
|
|
||||||
|
### 2. Create Environment File
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp posse-party.env.example .env
|
||||||
|
nano .env # or use your preferred editor
|
||||||
|
```
|
||||||
|
|
||||||
|
**Required settings to fill in:**
|
||||||
|
- `SECRET_KEY_BASE` - The value from step 1
|
||||||
|
- `POSTGRES_PASSWORD` - A strong database password
|
||||||
|
- `APP_HOST` - Should already be set to `posseparty.bendtstudio.com`
|
||||||
|
|
||||||
|
**Optional but recommended:**
|
||||||
|
- Email configuration (for login and notifications)
|
||||||
|
- OAuth providers (for social login)
|
||||||
|
|
||||||
|
### 3. Deploy via Dokploy
|
||||||
|
|
||||||
|
1. Log into Dokploy: http://192.168.2.130:3000
|
||||||
|
2. Create a new project
|
||||||
|
3. Upload the compose file: `posse-party-compose.yml`
|
||||||
|
4. Upload your `.env` file
|
||||||
|
5. Deploy!
|
||||||
|
|
||||||
|
### 4. Add DNS Record
|
||||||
|
|
||||||
|
In Technitium DNS (http://192.168.2.130:5380):
|
||||||
|
- Add A record: `posseparty.bendtstudio.com` → `192.168.2.130`
|
||||||
|
|
||||||
|
### 5. Access Posse-Party
|
||||||
|
|
||||||
|
Once deployed, visit: https://posseparty.bendtstudio.com
|
||||||
|
|
||||||
|
The first user to register will become the admin.
|
||||||
|
|
||||||
|
## Services Included
|
||||||
|
|
||||||
|
- **web**: Rails application server (port 3000)
|
||||||
|
- **worker**: Background job processor (Solid Queue)
|
||||||
|
- **db**: PostgreSQL database
|
||||||
|
- **migrate**: One-time database migration service
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
### Backup Database
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh tim@192.168.2.18
|
||||||
|
cd /path/to/posse-party
|
||||||
|
docker exec posse-party-db-1 pg_dump -U postgres posse_party > backup-$(date +%Y%m%d).sql
|
||||||
|
```
|
||||||
|
|
||||||
|
### View Logs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh tim@192.168.2.18
|
||||||
|
docker logs posse-party-web-1 -f
|
||||||
|
docker logs posse-party-worker-1 -f
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update to Latest Version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh tim@192.168.2.18
|
||||||
|
cd /path/to/posse-party
|
||||||
|
docker compose pull
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration Details
|
||||||
|
|
||||||
|
### Email Setup (Optional but Recommended)
|
||||||
|
|
||||||
|
Posse-Party can send emails for:
|
||||||
|
- Account verification
|
||||||
|
- Password resets
|
||||||
|
- Notifications
|
||||||
|
|
||||||
|
See the `.env.example` file for supported providers (SendGrid, Mailgun, etc.)
|
||||||
|
|
||||||
|
### OAuth Setup (Optional)
|
||||||
|
|
||||||
|
Enable social login by configuring OAuth providers:
|
||||||
|
1. Create OAuth app at the provider (GitHub, Google, etc.)
|
||||||
|
2. Add callback URL: `https://posseparty.bendtstudio.com/auth/<provider>/callback`
|
||||||
|
3. Copy Client ID and Secret to `.env`
|
||||||
|
|
||||||
|
### S3/MinIO Storage (Optional)
|
||||||
|
|
||||||
|
By default, uploads are stored locally. To use S3 or MinIO:
|
||||||
|
1. Uncomment S3 configuration in `.env`
|
||||||
|
2. Set your credentials and bucket name
|
||||||
|
3. Redeploy
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Service Won't Start
|
||||||
|
|
||||||
|
Check logs:
|
||||||
|
```bash
|
||||||
|
docker service logs posse-party-web-1 --tail 50
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database Connection Issues
|
||||||
|
|
||||||
|
Verify database is healthy:
|
||||||
|
```bash
|
||||||
|
docker ps | grep posse-party-db
|
||||||
|
docker logs posse-party-db-1 --tail 20
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTPS Not Working
|
||||||
|
|
||||||
|
1. Check DNS record is correct
|
||||||
|
2. Verify Traefik labels in compose file
|
||||||
|
3. Check Traefik dashboard: http://192.168.2.130:8080
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- **Official Repo**: https://github.com/searlsco/posse_party
|
||||||
|
- **Documentation**: https://github.com/searlsco/posse_party/tree/main/docs
|
||||||
|
- **Website**: https://posseparty.com
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
For Posse-Party specific issues:
|
||||||
|
- GitHub Issues: https://github.com/searlsco/posse_party/issues
|
||||||
|
|
||||||
|
For deployment issues with your homelab:
|
||||||
|
- Check your Dokploy logs
|
||||||
|
- Review Traefik routing at http://192.168.2.130:8080
|
||||||
110
posse-party-compose.yml
Normal file
110
posse-party-compose.yml
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres:17-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB:-posse_party}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
volumes:
|
||||||
|
- db_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- posse-party-network
|
||||||
|
|
||||||
|
migrate:
|
||||||
|
image: ghcr.io/searlsco/posse_party:latest
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-posse_party}
|
||||||
|
RAILS_ENV: production
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
command: ["./script/release"]
|
||||||
|
restart: "no"
|
||||||
|
networks:
|
||||||
|
- posse-party-network
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: ghcr.io/searlsco/posse_party:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-posse_party}
|
||||||
|
RAILS_ENV: production
|
||||||
|
APP_HOST: ${APP_HOST:-posseparty.bendtstudio.com}
|
||||||
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
|
||||||
|
FORCE_SSL: "false"
|
||||||
|
command: ["./script/server"]
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -fsS http://localhost:3000/up || exit 1"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 20s
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- posse-party-network
|
||||||
|
- dokploy-network
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.posseparty-web.rule=Host(`${APP_HOST:-posseparty.bendtstudio.com}`)
|
||||||
|
- traefik.http.routers.posseparty-web.entrypoints=web
|
||||||
|
- traefik.http.services.posseparty-web.loadbalancer.server.port=3000
|
||||||
|
- traefik.http.routers.posseparty-web.service=posseparty-web
|
||||||
|
- traefik.http.routers.posseparty-web.middlewares=redirect-to-https@file
|
||||||
|
- traefik.http.routers.posseparty-websecure.rule=Host(`${APP_HOST:-posseparty.bendtstudio.com}`)
|
||||||
|
- traefik.http.routers.posseparty-websecure.entrypoints=websecure
|
||||||
|
- traefik.http.services.posseparty-websecure.loadbalancer.server.port=3000
|
||||||
|
- traefik.http.routers.posseparty-websecure.service=posseparty-websecure
|
||||||
|
- traefik.http.routers.posseparty-websecure.tls.certresolver=letsencrypt
|
||||||
|
|
||||||
|
worker:
|
||||||
|
image: ghcr.io/searlsco/posse_party:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-posse_party}
|
||||||
|
RAILS_ENV: production
|
||||||
|
APP_HOST: ${APP_HOST:-posseparty.bendtstudio.com}
|
||||||
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
command: ["./script/worker"]
|
||||||
|
healthcheck:
|
||||||
|
test: [
|
||||||
|
"CMD-SHELL",
|
||||||
|
"./bin/rails runner 'exit(SolidQueue::Process.where(\"last_heartbeat_at > ?\", SolidQueue.process_alive_threshold.ago).exists? ? 0 : 1)'"
|
||||||
|
]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
networks:
|
||||||
|
- posse-party-network
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
posse-party-network:
|
||||||
|
driver: bridge
|
||||||
|
dokploy-network:
|
||||||
|
external: true
|
||||||
109
posse-party.env.example
Normal file
109
posse-party.env.example
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
# Posse-Party Configuration
|
||||||
|
# Copy this file to .env and fill in your values before deploying
|
||||||
|
|
||||||
|
# Required Settings
|
||||||
|
# =================
|
||||||
|
|
||||||
|
# Your domain name for Posse-Party
|
||||||
|
# This will be used for HTTPS certificates and Rails URL generation
|
||||||
|
APP_HOST=posseparty.bendtstudio.com
|
||||||
|
|
||||||
|
# Secret key for Rails (generate with: openssl rand -hex 64)
|
||||||
|
SECRET_KEY_BASE=
|
||||||
|
|
||||||
|
# Database Configuration
|
||||||
|
# ======================
|
||||||
|
POSTGRES_USER=postgres
|
||||||
|
POSTGRES_PASSWORD=CHANGE_ME_TO_A_STRONG_PASSWORD
|
||||||
|
POSTGRES_DB=posse_party
|
||||||
|
|
||||||
|
# Optional: Email Configuration (required for login emails and notifications)
|
||||||
|
# Uncomment and configure one of the following providers:
|
||||||
|
|
||||||
|
# Option 1: SMTP (Generic)
|
||||||
|
# MAIL_PROVIDER=smtp
|
||||||
|
# MAIL_ADDRESS=smtp.example.com
|
||||||
|
# MAIL_PORT=587
|
||||||
|
# MAIL_USER_NAME=your-email@example.com
|
||||||
|
# MAIL_PASSWORD=your-email-password
|
||||||
|
# MAIL_AUTHENTICATION=plain
|
||||||
|
# MAIL_ENABLE_STARTTLS_AUTO=true
|
||||||
|
|
||||||
|
# Option 2: SendGrid
|
||||||
|
# MAIL_PROVIDER=sendgrid
|
||||||
|
# SENDGRID_API_KEY=your-api-key
|
||||||
|
|
||||||
|
# Option 3: Mailgun
|
||||||
|
# MAIL_PROVIDER=mailgun
|
||||||
|
# MAILGUN_API_KEY=your-api-key
|
||||||
|
# MAILGUN_DOMAIN=your-domain.com
|
||||||
|
|
||||||
|
# Option 4: Resend
|
||||||
|
# MAIL_PROVIDER=resend
|
||||||
|
# RESEND_API_KEY=your-api-key
|
||||||
|
|
||||||
|
# Option 5: Postmark
|
||||||
|
# MAIL_PROVIDER=postmark
|
||||||
|
# POSTMARK_API_KEY=your-api-key
|
||||||
|
|
||||||
|
# Option 6: Amazon SES
|
||||||
|
# MAIL_PROVIDER=amazon_ses
|
||||||
|
# AWS_ACCESS_KEY_ID=your-access-key
|
||||||
|
# AWS_SECRET_ACCESS_KEY=your-secret-key
|
||||||
|
# AWS_REGION=us-east-1
|
||||||
|
|
||||||
|
# Option 7: Brevo (formerly Sendinblue)
|
||||||
|
# MAIL_PROVIDER=brevo
|
||||||
|
# BREVO_API_KEY=your-api-key
|
||||||
|
|
||||||
|
# Option 8: Mailjet
|
||||||
|
# MAIL_PROVIDER=mailjet
|
||||||
|
# MAILJET_API_KEY=your-api-key
|
||||||
|
# MAILJET_SECRET_KEY=your-secret-key
|
||||||
|
|
||||||
|
# From Address (required if using email)
|
||||||
|
# MAIL_FROM_ADDRESS=posseparty@bendtstudio.com
|
||||||
|
|
||||||
|
# Optional: OAuth Providers (for social login)
|
||||||
|
# Uncomment and configure the providers you want to use:
|
||||||
|
|
||||||
|
# GitHub OAuth
|
||||||
|
# GITHUB_CLIENT_ID=your-github-client-id
|
||||||
|
# GITHUB_CLIENT_SECRET=your-github-client-secret
|
||||||
|
|
||||||
|
# Google OAuth
|
||||||
|
# GOOGLE_CLIENT_ID=your-google-client-id
|
||||||
|
# GOOGLE_CLIENT_SECRET=your-google-client-secret
|
||||||
|
|
||||||
|
# Twitter/X OAuth
|
||||||
|
# TWITTER_CLIENT_ID=your-twitter-client-id
|
||||||
|
# TWITTER_CLIENT_SECRET=your-twitter-client-secret
|
||||||
|
|
||||||
|
# LinkedIn OAuth
|
||||||
|
# LINKEDIN_CLIENT_ID=your-linkedin-client-id
|
||||||
|
# LINKEDIN_CLIENT_SECRET=your-linkedin-client-secret
|
||||||
|
|
||||||
|
# Optional: External Services
|
||||||
|
# ============================
|
||||||
|
|
||||||
|
# CDN for static assets (optional)
|
||||||
|
# RAILS_ASSET_HOST=https://cdn.bendtstudio.com
|
||||||
|
|
||||||
|
# S3/MinIO for file storage (optional, uses local filesystem by default)
|
||||||
|
# AWS_ACCESS_KEY_ID=your-access-key
|
||||||
|
# AWS_SECRET_ACCESS_KEY=your-secret-key
|
||||||
|
# AWS_REGION=us-east-1
|
||||||
|
# S3_BUCKET_NAME=posse-party-uploads
|
||||||
|
# S3_ENDPOINT=https://s3.amazonaws.com # or your MinIO endpoint
|
||||||
|
|
||||||
|
# Optional: Feature Flags
|
||||||
|
# =======================
|
||||||
|
|
||||||
|
# Enable/disable user registrations
|
||||||
|
# REGISTRATION_ENABLED=true
|
||||||
|
|
||||||
|
# Default locale
|
||||||
|
# LOCALE=en
|
||||||
|
|
||||||
|
# Time zone
|
||||||
|
# TIME_ZONE=America/New_York
|
||||||
Reference in New Issue
Block a user