Strapi docker persistence

[details=“System Information”]

  • Strapi Version: 3.6.5
  • Operating System: macOS
  • Database: mysql
  • Node Version:
  • NPM Version:
  • Yarn Version:
    hi, I have tried strapi through docker image.
    GitHub - strapi/strapi-docker: Install and run your first Strapi project using Docker
    Started the docker image and I created administrator user & few content types etc.,
    How can I ensure the content types / users I created is persisted ?
    Suppose if I pull docker image to a new machine it starts as brand new and all my strapi changes are lost. I can understand starting a new docker container will start fresh strapi.
    Should I keep persistence (mysql) in another container. Open for suggestions

1 Like

We’re struggling with a similar issue. If we run a dev site in a Docker container in Kubernetes and have a non-dev making Content Types, how can we then make those changes part of the image so that they persist?

Checkout Docker Volumes