Sign inSign up

boro/strapi

By boro

•Updated about 7 years ago

Strapi docker container with the ability to automatically git clone / git pull fresh code on startup

Image
0

3.6K

boro/strapi repository overview

⁠Strapi⁠ containerized

Strapi

API creation made simple, secure and fast. The most advanced open-source Content Management Framework to build powerful API with no effort.


Docker Pulls

⁠strapi@beta (3.0.0-beta.9)

  1. git clone https://github.com/TheBoroer/docker-strapi && cd strapi-docker
  2. Run using docker-compose up

⁠Pull from Docker Hub

docker pull boro/strapi
⁠Then run image

Start a database (e.g. MongoDB)

docker run -e MONGO_INITDB_DATABASE=strapi \
           -v `pwd`/db/:/data/db \
           --name strapi-mongo \
           -d mongo

Start 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 boro/strapi

You should the be able to access your Strapi installation at localhost:1337⁠.

⁠Use as base image

FROM boro/strapi

⁠Environment variables

  • APP_NAME to override the strapi-app generated folder name (you should also update the volumes paths).
  • DATABASE_CLIENT a database providers supported by Strapi: MongoDB, Postgres, MySQL, Sqlite3 and Redis.
  • DATABASE_HOST database service name.
  • DATABASE_PORT depends on your database client.
  • DATABASE_NAME initializes a database with specific name (default strapi). When using MongoDB, you should also update the MONGO_INITDB_DATABASE environment in the db service.
  • DATABASE_USERNAME set the username of the database connection.
  • DATABASE_PASSWORD set the password of the database connection.
  • DATABASE_SRV boolean for SRV.
  • DATABASE_SSL boolean for SSL.
  • DATABASE_AUTHENTICATION_DATABASE set the authentication.

Tag summary

Content type

Image

Digest

Size

110.6 MB

Last updated

about 7 years ago

docker pull boro/strapi