Hi i’ve mounted a sqlite database to the volume via the database url env DATABASE_URL=sqlite3:///mnt/volumename/production.sqlite
but whenever i deploy the database is is mounted in the app/path to db
folder instead of mnt/path to db
. Therefore on any redeployment the data is wiped.
its a small Nodejs app with sequelize as the orm. My build and start script is
"build": "rimraf ./build && tsc",
"start": "yarn run build && yarn db:migrate:prod && node ./build/index.js",
fly.toml looks like this
app = "app name"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[env]
PORT = "8080"
[experimental]
allowed_public_ports = []
auto_rollback = true
[mounts]
source="nameofvolume"
destination="/mnt/nameofvolume"
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
I need the database to remain regardless of deployment. How can i go about this.