Hi everybody !
First at all, thank you for your work and for this amazing headless CMS, it is very nice to use this free app
So, my question :
I am using 2 strapi apps in production to manage 2 different websites.
The data about this apps :
- Strapi Version: 3.0.2
- Operating System: Ubuntu 18.04.4
- Database: MongoDB on Atlas provider
- Node Version: 12.18.1
- NPM Version: 6.14.5
This 2 apps are hosted on an Azure virtual machine, using PM2 for the deployment.
MongoDB are hosted on MongoDB Atlas.
Now, we would like to migrate this app to a kubernetes service, to not have 1 billion of virtual machines, one for each service…
So, I am trying to migrate our strapi apps to a docker version of them.
My process :
- Run a strapi latest version with a local mongo database with docker-compose
- Run a strapi 3.0.2 version with a local mongo database with docker-compose
- Run a strapi 3.0.2 version connected to our MongoDB Atlas with docker-compose
- Try to deploy it on our kubernetes
The first step was done without any problem.
For the second step, I had to migrate to Strapi 3.0.6 because I had a dependencies problem with the 3.0.2 version. I did not upgrade to the last version because there are breaking changes, and I would like to not spend time on this.
The third step was more difficult, but I succeed to do it using this environment variables :
DATABASE_CLIENT: mongo DATABASE_NAME: my_database_name DATABASE_HOST: my_database_host DATABASE_PORT: 27017 DATABASE_USERNAME: my_database_username DATABASE_PASSWORD: my_database_password DATABASE_SRV: 'true' AUTHENTICATION_DATABASE: admin DATABASE_SSL: 'true'
It works, I succeed to connect myself to my local strapi project but… I don’t have any content-type
I am not familiar about how strapi is coded, but what I understand is that content-type are hardcoded in my project, and data is stored in my mongo database (is it why I need to restart the server when I modify schema ? )
So, I am a little bit lost
What is the good process ? Should I use docker-compose ?
I read the strapi-docker github repository, I read the strapi docker documentation too, but it still not easy for me.
Somebody could help me to define the process please ?
I add that this is my first time of using docker and kubernetes, I am learning this technologies.