Created
January 11, 2021 05:50
-
-
Save MexsonFernandes/b1eba6cd5d5939fa2d7236e851830449 to your computer and use it in GitHub Desktop.
Deploy strapi with persistence mongo using docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
strapi: | |
build: | |
context: ./ | |
container_name: strapi_cms | |
env_file: .env | |
restart: unless-stopped | |
environment: | |
DATABASE_URI: ${DATABASE_URI} | |
networks: | |
- strapi-app-network | |
ports: | |
- "1337:1337" | |
depends_on: | |
- mongo | |
mongo: | |
image: mongo | |
container_name: strapi_mongo | |
volumes: | |
- ./strapidata:/data/db | |
networks: | |
- strapi-app-network | |
ports: | |
- "27017:27017" | |
networks: | |
strapi-app-network: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment