https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/installation/docker.html#creating-a-strapi-project
dockerize strapi with docker and dockercompose
Resolve different error
https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/installation/docker.html#creating-a-strapi-project
dockerize strapi with docker and dockercompose
Resolve different error
2
Answers
Dockerize Strapi with Docker-compose
#docker-compose file
you can use my dockerized project.
Dockerfile:
if you don’t use
RUN npm run build
your project on port 80 orhttp://localhost
work but strapi admin templates callhttp://localhost:1337
on your system that you are running onhttp://localhost
and there is nohttp://localhost:1337
stabile url and strapi throw exceptions like:docker-compose.yml:
in docker compose file I used postgres as database, you can use any other databases and set its config in app service environment variables like:
for using environment variables in project you must use
process.env
for getting operating system environment variables.change
app/config/database.js
file to: