Link to repo – https://github.com/kodaneflash/solofoundershub.com Nothing in the code is incorrect, this is a clone of a repostiroy kentcdodds.com, it has to do with the setup.
This is a remix vite repository that is meant to deployed on fly.io, relevant files – fly.toml dockerfile prisma/schema.prisma. This repository uses litefs other/litefs.yml and sqlite for the database
Database paths:
DATABASE_FILENAME="sqlite.db"
DATABASE_URL="file:./sqlite.db?connection_limit=1"
CACHE_DATABASE_PATH="other/cache.db"
LITEFS_DIR="./prisma"
Im trying to deploy it to production to practice contributing, I set all .env variables in fly.io, I ran npm run setup -s successfully, attached consul to the fly.io app, heres some relevant fly.io logs:
o] level=INFO msg="http: POST /stream: error: cannot connect to self"2024-07-23T23:31:42.173 app[781621dc556128] den [info] level=INFO msg="FE9CEB17D71301DE: disconnected from primary with error, retrying: connect to primary: invalid response: code=400 ('http://781621dc556128.vm.solofounders.internal:20202')"2024-07-23T23:31:43.382 app[781621dc556128] den [info] level=INFO msg="cannot release consul key: key=solofounders-ewpm904zx4oq7zoy/litefs/solofounders_2 session=c517220e-5d2e-363a-4aaf-41fba8bee13b"2024-07-23T23:31:43.466 app[781621dc556128] den [info] level=INFO msg="FE9CEB17D71301DE: cannot acquire lease or find primary, retrying: no primary"2024-07-23T23:31:44.636 app[781621dc556128] den [info] level=INFO msg="FE9CEB17D71301DE: primary lease acquired, advertising as http://781621dc556128.vm.solofounders.internal:20202"2024-07-23T23:31:44.677 app[781621dc556128] den [info] level=INFO msg="connected to cluster, ready"2024-07-23T23:31:44.678 app[781621dc556128] den [info] level=INFO msg="proxy server listening on: http://localhost:8080"2024-07-23T23:31:44.678 app[781621dc556128] den [info] level=INFO msg="executing command: npx [prisma migrate deploy]2024-07-23T23:31:45.963 app[781621dc556128] den [info] Environment variables loaded from .env2024-07-23T23:31:45.965 app[781621dc556128] den [info] Error: Could not find a schema.prisma file that is required for this command.2024-07-23T23:31:45.965 app[781621dc556128] den [info] You can either provide it with --schema, set it as `prisma.schema` in your package.json or put it into the default location ./prisma/schema.prisma https://pris.ly/d/prisma-schema-location
I folllowed all instructions but keep gettig the error level=INFO msg="connected to cluster, ready" 2024-07-23T22:03:13.566 app[781621dc556128] den [info] level=INFO msg="executing command: npx [prisma migrate deploy]" 2024-07-23T22:03:14.835 app[781621dc556128] den [info] Environment variables loaded from .env 2024-07-23T22:03:14.837 app[781621dc556128] den [info] Error: Could not find a schema.prisma file that is required for this command.
It is supposed to build the docker image using fly.io remote build and deploy as an app, deployment is unable to suceeed due to the error stating schema.prisma cant be located. It is indeed in the right place.
James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.