Sqlite as non root

I’m deploying a Remix app using a Sqlite database and Prisma. My entrypoint always runs prisma migrate deploy but I get this error Error querying the database: attempt to write a readonly database.

I’m using node:18.12.0-alpine3.16 as the running image. The running portion of my Dockerfile is:

FROM base

ENV DATABASE_URL=file:/data/sqlite.db
ENV PORT="8080"
ENV NODE_ENV="production"

# add shortcut for connecting to database CLI
RUN echo "#!/bin/sh\nset -x\nsqlite3 \$DATABASE_URL" > /usr/local/bin/database-cli && chmod +x /usr/local/bin/database-cli

WORKDIR /myapp

RUN mkdir -p /data && chown node:node /data \
  && chown -R node:node /myapp

COPY --from=production-deps --chown=node:node /myapp/node_modules /myapp/node_modules
COPY --from=build --chown=node:node /myapp/node_modules/.prisma /myapp/node_modules/.prisma

COPY --from=build --chown=node:node /myapp/build /myapp/build
COPY --from=build --chown=node:node /myapp/public /myapp/public
COPY --from=build --chown=node:node /myapp/package.json /myapp/package.json
COPY --from=build --chown=node:node /myapp/start.sh /myapp/start.sh
COPY --from=build --chown=node:node /myapp/prisma /myapp/prisma

USER node

ENTRYPOINT [ "./start.sh" ]

Does anyone have experience with sqlite and non root containers?