Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker): Use named volumes and add env_file field to dist compose #1773

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Docker/dist/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ services:
environment:
- DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db
- REDIS_HOST=redis
env_file:
- server.env
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
redis:
Expand All @@ -29,7 +31,7 @@ services:
ports:
- "6379:6379"
volumes:
- ./redis/data:/data
- checkmate-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
Expand All @@ -40,7 +42,13 @@ services:
image: bluewaveuptime/uptime_database_mongo:latest
restart: always
volumes:
- ./mongo/data:/data/db
- checkmate-mongo-data:/data/db
command: ["mongod", "--quiet"]
ports:
- "27017:27017"

volumes:
checkmate-mongo-data:
name: checkmate-mongo-data
checkmate-redis-data:
name: checkmate-redis-data