Pular para o conteúdo

Buscar na documentação

Buscar na documentação do Skiffly

Do Heroku

Dynos become services, add-ons become templates with volumes, config vars become variables, the Procfile becomes a start command. A step-by-step move.

Concept mapping#

HerokuSkifflyNotes
AppProject with one or more servicesone service per process type
Dyno type (web, worker)Serviceweb gets a domain; workers run without one
Pipeline stages (staging, production)Environmentsone project, staging and production environments
Review appsPR preview environmentsenable PR previews on the project
BuildpacksRailpackdetects the same languages; or add a Dockerfile
ProcfileStart command per serviceweb: gunicorn app:app → start command gunicorn app:app
Config varsVariables${{Postgres.DATABASE_URL}} references instead of copied URLs
Heroku Postgres / Redis add-onsPostgres / Redis templates with volumesyou own the instance and its data
Heroku SchedulerCron schedule on a service0 * * * *
heroku run bashskiffly sshshell in the running container
heroku logs --tailskiffly logs -f
heroku ps:scale web=2replicasSettings → Deploy → Replicas
Dyno sizesCPU / memory limits per serviceany value within the plan
*.herokuapp.com*.skiffly.cloudcustom domains with automatic TLS
heroku.yml.skiffly/skiffly.tsconfig as code
Monthly invoicePrepaid balancePayPal or crypto

Step by step#

  1. Sign in at app.skiffly.dev with GitHub; the code must be on GitHub (Heroku's git remote is not a source).

  2. Create the project and a service per process type: skiffly init in the repository, skiffly up for web. For a worker, create a second service from the same repository and set its start command to the worker line of the Procfile; leave it without a domain.

  3. Databases. skiffly deploy --template postgres (and redis). Copy the data:

    heroku pg:backups:capture -a my-app && heroku pg:backups:download -a my-app     # latest.dump
    skiffly connect postgres --print
    pg_restore -d "<url>" --no-owner --clean --if-exists latest.dump
    skiffly proxy delete <port>
  4. Config vars. heroku config -s -a my-app > vars.env, drop the add-on URLs, then:

    skiffly variables set --skip-deploys $(cat vars.env | xargs)
    skiffly variables set 'DATABASE_URL=${{Postgres.DATABASE_URL}}' 'REDIS_URL=${{Redis.REDIS_URL}}'
    skiffly redeploy
  5. Port. Heroku sets $PORT; so does Skiffly. Nothing to change if the app already reads it.

  6. Release phase. There is no release phase hook. Run migrations from the start command (sh -c "npm run migrate && npm start") or as a one-off: skiffly ssh -- npm run migrate.

  7. Scheduler. For each scheduled job create a service from the same repository with a cron schedule and the job's command as the start command.

  8. Domain. Add the custom domain, create the CNAME and TXT records, verify, then switch DNS from Heroku once the certificate is issued.

  9. Turn Heroku off after a few days of traffic on Skiffly.

Differences worth knowing#

  • Skiffly services do not sleep unless you turn on App Sleeping; Free-plan and idle hobby apps are not stopped on a timer.
  • The filesystem is ephemeral like a dyno's, but you can attach a persistent volume for uploads or SQLite.
  • Logs are kept for the last 5 000 lines per deployment; forward them from the app if you need history.
  • Add-on marketplace: pick from 136 templates instead; you run the instance and pay for its resources, not a per-add-on price.