hi all, i'm looking to run prisma as a docker cont...
# orm-help
c
hi all, i'm looking to run prisma as a docker container in ecs but i'm lacking clarity on what happens if the container restarts/moves in terms of state retention of schema deploys. for stateful services, like postgres, there's generally a volume mount in
/var/lib/postgresql/data
which you can map to an external filesystem. does prisma have something similar?
generally speaking, i'd peek at the Dockerfile to look for a
VOLUME ...
declaration but unfortunately i couldn't find any Dockerfiles linked from here: https://hub.docker.com/r/prismagraphql/prisma/
j
I dont think you need to worry. In our mysql/prisma setup, prisma made its own database in our mysql. so i guess that is where the state is persisted
c
thanks @jared, to clarify, i'm not worried about losing the data itself, but i am worried about losing the mappings between the graphql types and the db tables that's typically persisted to the prisma server when you run
prisma deploy
for example, if my ecs host dies and i need to bring up prisma on a different machine with a fresh file system, most container orchestrators have a way to "move" declared volumes between hosts
i want to avoid a situation where i have to start from scratch if the container host dies, does that make sense?
j
after running a prisma deploy, connect to the DB using mysql workbench or something, and you'll see that there's 3 databases: yourProjectName, prisma and sys. I'm guessing that's where everything is
c
ah! let me check that
j
I know that when i restart the prisma container locally, there's no problem.
c
thanks, i just took a look at the database i have and i don't think it's storing the graphql schema metadata.
oh! it looks like it's stored in the management schema in postgres