Created
September 28, 2023 13:44
-
-
Save Leeaandrob/f73df051b09bf3ea4cce755ac29a67f1 to your computer and use it in GitHub Desktop.
docker-mongodb_redis.yaml
This file contains hidden or 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.7' | |
| services: | |
| db: | |
| container_name: db_mongo | |
| image: mongo | |
| ports: | |
| - "27017:27017" | |
| volumes: | |
| - mongodata:/data/db | |
| redis: | |
| image: "redis:alpine" | |
| command: redis-server --requirepass sOmE_sEcUrE_pAsS | |
| ports: | |
| - "6379:6379" | |
| volumes: | |
| - $PWD/redis-data:/var/lib/redis | |
| - $PWD/redis.conf:/usr/local/etc/redis/redis.conf | |
| environment: | |
| - REDIS_REPLICATION_MODE=master | |
| volumes: | |
| mongodata: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Para rodar o mongodb dependendo da versão existe as opções abaixo.
docker-compose up db
docker compose up db