Hi everyone
I’ve followed the Rails 8 The Demo video to spin up a fresh rails app, and tried deploying it to Hetzner using Kamal2 with the following config/deploy.yml
Everything works fine, it connects via ssh to my Hetzner server and deploys the current commit tag.
Also, it successfully persists on DB (using sqlite3). For instance, when I create a Post.
However despite the fact that I’ve configured a separate volume there (I bought a volume on the same zone and mounted it in my server), every time I deploy it, the storage uses a brand new sqlite file.
I tried redeploying an old version, and voilá, the data is there. I’m confused about this behavior and I’d much appreciate some thoughts on what’s happening and how should I fix my mistakes.
Thank you
service: blog
image: caioabe/blog
servers:
web:
- 5.161.243.148
proxy:
false
registry:
username: caioabe
password:
- KAMAL_REGISTRY_PASSWORD
env:
secret:
- RAILS_MASTER_KEY
clear:
SOLID_QUEUE_IN_PUMA: true
RAILS_LOG_LEVEL: debug
aliases:
console: app exec --interactive --reuse "bin/rails console"
shell: app exec --interactive --reuse "bash"
logs: app logs -f
dbc: app exec --interactive --reuse "bin/rails dbconsole"
volumes:
- "blog_storage:/mnt/volume-ash-1"
asset_path: /rails/public/assets
builder:
arch: amd64