-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (32 loc) · 1.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
34 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Single-file infrastructure for the Audithex persistence layer.
#
# Bring up: docker compose up -d
# Tail logs: docker compose logs -f
# Tear down: docker compose down (keeps the data volume)
# Wipe state: docker compose down -v (drops the data volume)
#
# After `up`, point the CLI at the local Mongo by either:
# - copying .env.example to .env (the MONGODB_URI line below matches)
# - exporting MONGODB_URI=mongodb://localhost:27017/audithex
#
# The service exposes Mongo on the host's 27017 by default. Override
# the host port with AUDITHEX_MONGO_PORT in your shell when 27017 is
# already taken.
services:
mongodb:
image: mongo:7
container_name: audithex-mongodb
restart: unless-stopped
ports:
- "${AUDITHEX_MONGO_PORT:-27017}:27017"
volumes:
- audithex-mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.runCommand({ ping: 1 })"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
audithex-mongo-data:
name: audithex-mongo-data