M1_ProjetWeb/docker-compose.yml
Nabil Ould Hamou 9e064c220c
zz
2024-12-18 11:39:41 +01:00

41 lines
No EOL
871 B
YAML

services:
mongodb:
build: ./mongodb_rs
hostname: mongodb
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=temp-root-username
- MONGO_INITDB_ROOT_PASSWORD=temp-password
- MONGO_INITDB_DATABASE=chat_projetweb
- MONGO_REPLICA_HOST=localhost
- MONGO_REPLICA_PORT=27017
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db/
- mongo-logs:/var/log/mongodb/
networks:
- app_network
redis:
image: redis:latest
hostname: redis-server
restart: always
ports:
- "6379:6379"
command: redis-server --save 20 1 --loglevel warning
environment:
- REDIS_PASSWORD=temp-redis-password
volumes:
- redis-data:/root/redis
networks:
- app_network
networks:
app_network:
driver: bridge
volumes:
mongo-data:
mongo-logs:
redis-data: