- This starter is based on docker to develop, deploy and serve a Strapi application
- I think the best practice here is to duplicate this template and then directly deploy it on your host server and work from there
- It's not very convenient to work localy and then use versioning to keep your data type. Moreover, your database could be wiped due to the instability of Docker's volumes
- We are using Makefile to run Docker scripts
- Get your
.env
file and set theNODE_ENV
variable todevelopment
- Generate the
API_KEYS
,API_TOKEN_SALT
,ADMIN_JWT_TOKEN
andJWT_SECRET
variables according to Strapi reco - Start your application with autoReload enable by runnning:
$ make docker-dev
- Get your
.env
file and setNODE_ENV
variable toproduction
- Use environment variables generate while developing
- Once you put your Strapi application on the hosting server, you can run it by doing:
$ make docker-prod
- Please make sure to backup your database, docker's volumes can be unstable and result to a loss of data
- Please make sure to delete your
node_modules
folder before any run - You cannot keep your data between
development
andproduction
environments