Strapi containerized
API creation made simple, secure and fast. The most advanced open-source Content Management Framework to build powerful API with no effort.
git clone https://github.com/strapi/strapi-docker && cd strapi-docker- Run using
docker-compose up
docker pull strapi/strapiStart a database (e.g. MongoDB)
docker run -e MONGO_INITDB_DATABASE=strapi \
-v `pwd`/db/:/data/db \
--name strapi-mongo \
-d mongoStart strapi
docker run -e APP_NAME=strapi-app \
-e DATABASE_CLIENT=mongo \
-e DATABASE_HOST=strapi-mongo \
-e DATABASE_PORT=27017 \
-e DATABASE_NAME=strapi \
-v `pwd`/strapi-app:/usr/src/api/strapi-app \
--link strapi-mongo:mongo \
-p 1337:1337 \
--name strapi -d strapi/strapiYou should the be able to access your Strapi installation at localhost:1337.
FROM strapi/strapiAPP_NAMEto override thestrapi-appgenerated folder name (you should also update the volumes paths).DATABASE_CLIENTa database providers supported by Strapi: MongoDB, Postgres, MySQL, Sqlite3 and Redis.DATABASE_HOSTdatabase service name.DATABASE_PORTdepends on your database client.DATABASE_NAMEinitializes a database with specific name (default strapi). When using MongoDB, you should also update theMONGO_INITDB_DATABASEenvironment in the db service.DATABASE_USERNAMEset the username of the database connection.DATABASE_PASSWORDset the password of the database connection.DATABASE_SSLboolean for SSL.DATABASE_AUTHENTICATION_DATABASEset the authentification.
