This app was created inside a docker container that was started with
docker run -it -v /Users/me/development:/development -w /development ruby:latest bash
- Make sure you have the .sqlite3, sqlite3-wal, and sqlite3-shm files.
- Run
rails db:create db:migrate - Copy over all three files, replacing the files that rails created.
Importing data from prod to development:
sqlite3 storage/development.sqlite3.output storage/dev.sql.dump.exitrails db:drop db:create db:migratesqlite3 storage/development.sqlite3.read storage/dev.sql- There will probably be some migration, ar_internal_metadata, and index errors. You can get rid of the migration and ar_internal_metadata errors by running these commands before:
delete from ar_internal_metadata;delete from schema_migrations;
The database is backed up nightly via a cron job that rsyncs the deploy home directory to the /mnt/database_backup volume. That volume is then backed up by the cloud provider. You can check the cron logs by running sudo grep CRON /var/sys/log. I installed Postfix to handle messages.
- You will need the kamal alias. You can find this alias in the docs if you don't have it.
- You will need to copy the .env.tmpl and fill it in if you are on a new machine.
Kamal setupif you are doing it for the first time on a server orkamal deployif you are not.- Currently we only deploy to dev via kamal