-
I want to deploy a demo Rails app to a single VPS using SQLite (DHH wrote that for a project "which is going to be deployed to a single server, you should just use sqlite"). However I didn't find details on how to configure Kamal with sqlite ( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
For anyone interested, the setup below allowed me to deploy a Rails app with SQLite to a single server. The config/deploy.yml: service: ...
image: ...
servers:
- <ip address>
registry:
username: ...
password:
- KAMAL_REGISTRY_PASSWORD
volumes:
- "storage:/rails/storage"
env:
secret:
- RAILS_MASTER_KEY config/database.yml (default - left untouched): default: &default
adapter: sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
production:
<<: *default
database: storage/production.sqlite3 |
Beta Was this translation helpful? Give feedback.
-
Hi @sedubois. I have similar config/deploy.yml and config/database.yml files and I'm running into permissions issues with the volume on the host. Do you have any guidance for setting the permissions correctly on the host? |
Beta Was this translation helpful? Give feedback.
address already in use
was because nginx was already running on the server and blocking port 80.For anyone interested, the setup below allowed me to deploy a Rails app with SQLite to a single server. The
volumes
part is to persist the DB between deploys.config/deploy.yml:
config/database.yml (default - left untouched):