personal-blog

Source for my personal blog

personal-blog

Crystal and Kemal site deployed to core-code.net.

Local server

shards install
crystal run src/app.cr
open http://localhost:3000

The publishing interface is at /admin. Configure EDITOR_USERNAME, EDITOR_PASSWORD_HASH, and a random SESSION_SECRET before signing in. For local HTTP development, set COOKIE_SECURE=false; keep it true behind HTTPS. Generate the secret and password hash with:

openssl rand -hex 32
crystal eval 'require "crypto/bcrypt/password"; puts Crypto::Bcrypt::Password.create(ARGV[0]).to_s' -- 'your-password'

Production build

GIT_SHA=local crystal build --release src/app.cr -o bin/app

Pushes to main build with Crystal 1.21.0, restart the personal-blog systemd unit, and verify /deployment through GitHub Actions.

Production editor configuration

The deploy workflows install the app environment file and restart the service automatically. Add these secrets to the GitHub production environment once:

  • SESSION_SECRET: generate with openssl rand -hex 32.
  • EDITOR_USERNAME: the editor login name.
  • EDITOR_PASSWORD_HASH: bcrypt hash generated by the Crystal command above.

The deploy workflow sets COOKIE_SECURE=true for HTTPS. Missing or malformed editor secrets fail the workflow before deployment instead of leaving the editor unconfigured. Subsequent pushes to main update the server environment and restart the service automatically.

Repository

personal-blog

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 3
  • about 1 hour ago
  • September 5, 2026
License

Links
Synced at

Sat, 17 Oct 2026 12:02:00 GMT

Languages