Skip to content

A simple, fast photoblogging CMS built in Ruby on Rails which features responsive, high-resolution images, a customizable posting schedule, social media management and syndication, a GraphQL API, and more.

Notifications You must be signed in to change notification settings

gesteves/denali

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Denali

CI

A simple, fast photoblogging CMS built in Ruby on Rails which features responsive, high-resolution images. You can see it live at All-Encompassing Trip.

Features

A simple, streamlined entry editor

A customizable publishing schedule

Drag-and-drop organization of queued entries

Map view of entries

More features

  • Cross-posting of entries to Bluesky, Mastodon, Flickr, Instagram, and Threads
  • Auto-tagging of entries by location, equipment, and style
  • Automatic generation of blurhashes for image placeholders
  • Web push notifications
  • Webhooks
  • Automatic EXIF extraction and geotagging of photos
  • GraphQL API
  • Did I mention it's fast as heck?

Requirements

[TODO]

Installation & setup

[TODO]

Common tasks

Local development

The app runs in Docker. All Rails, Ruby, and Node commands must be run inside the container.

Starting the environment

docker compose up -d          # Start all services in background
docker compose down           # Stop all services
docker compose logs -f app    # Follow app logs

Building

docker compose build                    # Build/rebuild containers
docker compose build --no-cache         # Full rebuild (no cache)
docker compose up -d --build            # Rebuild and start

Running commands

docker compose run app rails console                 # Rails console
docker compose run app rails db:migrate              # Run migrations
docker compose run app rails test                    # Run tests
docker compose run app rake <task>                   # Run rake tasks
docker compose run app bundle install                # Install gems
docker compose run app bash                          # Interactive shell

Troubleshooting

# Reset the database
docker compose run app rails db:reset

# Clear Rails cache
docker compose run app rails tmp:clear

# Recreate containers from scratch
docker compose down
docker compose up -d --build --force-recreate

# Remove all volumes (deletes local database!)
docker compose down -v

# View container status
docker compose ps

# Check container resource usage
docker compose top

Production

Deploying

fly deploy

Viewing logs

fly logs

SSH into the app

fly ssh console

Rails console

fly ssh console -C "/app/bin/rails console"

Running migrations

Migrations run automatically on deploy, but to run manually:

fly ssh console -C "/app/bin/rails db:migrate"

Running rake tasks

fly ssh console -C "/app/bin/rake <task_name>"

Scaling

# Check current scale
fly scale show

# Scale web & worker machines (count)
fly scale count web=2 worker=2

# Scale machine size
fly scale vm shared-cpu-2x --memory 2048

# Scale worker memory
fly scale memory 2gb -a denali --process-group worker
fly scale memory 1gb -a denali --process-group worker

Backing up the database

The app automatically creates daily database backups and uploads them to S3.

Automated backups:

  • Runs daily at 9:00 AM
  • Creates PostgreSQL custom format dumps (.dump files)
  • Uploads to the S3 bucket specified in DB_BACKUP_BUCKET
  • Only runs in production when DB_BACKUP_BUCKET and DATABASE_URL are set

Create a backup manually:

fly ssh console -C "rake database:backup"

Download the most recent backup:

# Locally (downloads to project root, requires DB_BACKUP_BUCKET and AWS credentials)
docker compose run app rake database:download

Restore a backup:

pg_restore -d database_name denali_backup_YYYYMMDD_HHMMSS.dump

Required environment variables:

  • DB_BACKUP_BUCKET - S3 bucket name for backups
  • DATABASE_URL - Postgres connection string (automatically set by Fly.io)
  • AWS_REGION - AWS region (optional, defaults to us-east-1)
  • AWS credentials (via AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY or IAM roles)

About

A simple, fast photoblogging CMS built in Ruby on Rails which features responsive, high-resolution images, a customizable posting schedule, social media management and syndication, a GraphQL API, and more.

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •