Skip to content

Instantly share code, notes, and snippets.

@theanam
Created August 28, 2018 08:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save theanam/627aeebad28b135e30918fb3a1543907 to your computer and use it in GitHub Desktop.
Save theanam/627aeebad28b135e30918fb3a1543907 to your computer and use it in GitHub Desktop.
Docker Compose for Strapi with Mongodb
version : "3"
services:
strapi-mongo:
image: mongo
environment:
- MONGO_INITDB_DATABASE=strapi
volumes:
- ./db:/data/db
strapi-app:
image: strapi/strapi
environment:
- DATABASE_CLIENT=mongo
- DATABASE_HOST=strapi-mongo
- DATABASE_PORT=27017
- DATABASE_NAME=strapi
volumes:
- ./strapiapp:/usr/src/api/strapi-app
ports:
- 1337:1337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment