2024-11-30 15:21:52 +01:00
|
|
|
services:
|
2024-12-17 17:43:15 +01:00
|
|
|
|
2024-11-30 15:21:52 +01:00
|
|
|
mongodb:
|
2024-12-01 13:47:18 +01:00
|
|
|
build: ./mongodb_rs
|
2024-11-30 15:21:52 +01:00
|
|
|
hostname: mongodb
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- MONGO_INITDB_ROOT_USERNAME=temp-root-username
|
|
|
|
- MONGO_INITDB_ROOT_PASSWORD=temp-password
|
|
|
|
- MONGO_INITDB_DATABASE=chat_projetweb
|
2024-12-18 09:38:42 +01:00
|
|
|
- MONGO_REPLICA_HOST=mongodb
|
2024-12-01 13:47:18 +01:00
|
|
|
- MONGO_REPLICA_PORT=27017
|
2024-11-30 15:21:52 +01:00
|
|
|
ports:
|
|
|
|
- "27017:27017"
|
|
|
|
volumes:
|
|
|
|
- mongo-data:/data/db/
|
|
|
|
- mongo-logs:/var/log/mongodb/
|
|
|
|
networks:
|
2024-12-17 17:43:15 +01:00
|
|
|
- app_network
|
2024-11-30 15:21:52 +01:00
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:latest
|
2024-12-17 17:43:15 +01:00
|
|
|
hostname: redis-server
|
2024-11-30 15:21:52 +01:00
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "6379:6379"
|
|
|
|
command: redis-server --save 20 1 --loglevel warning
|
2024-11-30 15:38:32 +01:00
|
|
|
environment:
|
|
|
|
- REDIS_PASSWORD=temp-redis-password
|
2024-11-30 15:21:52 +01:00
|
|
|
volumes:
|
2024-11-30 15:38:32 +01:00
|
|
|
- redis-data:/root/redis
|
2024-11-30 15:21:52 +01:00
|
|
|
networks:
|
2024-12-17 17:43:15 +01:00
|
|
|
- app_network
|
2024-11-30 15:21:52 +01:00
|
|
|
|
|
|
|
networks:
|
2024-12-17 17:43:15 +01:00
|
|
|
app_network:
|
|
|
|
driver: bridge
|
2024-11-30 15:21:52 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
mongo-data:
|
|
|
|
mongo-logs:
|
|
|
|
redis-data:
|