I followed the shopify guide to deploy the shopify remix app in fly.io. When I load it I get an error that session table isn’t found. The instructions don’t really give info on how the fly.toml should be and I couldn’t find it online so here goes how I did it:
[http_service]
internal_port = 8081
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[env]
DATABASE_URL = "file:/data/dev.sqlite"
PORT = "8081"
SHOPIFY_APP_URL = "fly.dev url here"
SHOPIFY_API_KEY = "blahblahblah"
SCOPES = "read_files,read_products,read_themes,unauthenticated_read_product_tags,write_files,write_themes"
[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
[mounts]
source="myapp_data"
destination="/data"
my schema.prisma is:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = "file://data/dev.sqlite"
}
model Session {
id String @id
shop String
state String
isOnline Boolean @default(false)
scope String?
expires DateTime?
accessToken String
userId BigInt?
}
...
Any idea what I’m doing wrong? I’m not sure if the migration is automatic or if I have to put a command in the fly.toml file. Please let me know what I’m missing, thank you for reviewing this post!