strapi / strapi-docker

Install and run your first Strapi project using Docker
https://strapi.io
MIT License
1.16k stars 447 forks source link

Shouldn't this docker image start in production mode? #298

Closed Download closed 2 years ago

Download commented 3 years ago

Just looking at the code a bit to learn how to use this image, my eye got drawn towards this line:

strapi-docker/strapi/Dockerfile

CMD ["strapi", "develop"]

Shouldn't this image start in production mode? For me it's unexpected that this would start it in development mode.

JamesAlexanderHill commented 2 years ago

Strapi/strapi is for local development. If you want to run strapi in production mode via docker you will need to create your own image using strapi/base and a Dockerfile. This dockerfile can be referenced in a docker-compose.yaml for ease of use

Download commented 2 years ago

Looking at the README again I guess it actually says so on the tin. Thanks for your response 👍

JamesAlexanderHill commented 2 years ago

If you want some examples on how to use strapi/base in production see the following folder: here

Defs a good place to start