Skip to content

Commit

Permalink
🚧 progress: First draft for compose.yaml.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Apr 15, 2024
1 parent 7ba6191 commit 3fc6a35
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MONGO_VERSION=5.0
50 changes: 50 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
services:
patient-web:
restart: always
build:
context: .
target: development
depends_on:
- patient-db
networks:
- patient-network
expose:
- 3000

patient-db:
restart: always
image: "mongo:${MONGO_VERSION}"
volumes:
- patient-data:/data/db
- ./scripts/ensure-replica-set.js:/scripts/ensure-replica-set.js
networks:
- patient-network
expose:
- 27017
driver: "json-file"
options:
max-size: "100m"
max-file: "7"
entrypoint: [
"mongod",
"--dbpath", "/data/db",
"--replSet", "meteor"
]
healthcheck:
test: [
"CMD",
"mongo", "mongodb://patient-db:27017",
"--eval", "replSet = 'meteor'; hostname = 'patient-db'",
"/scripts/ensure-replica-set.js"
]
start_period: 40s
start_interval: 2s
interval: 1m30s
timeout: 10s
retries: 3

networks:
patient-network:

volumes:
patient-data:

0 comments on commit 3fc6a35

Please sign in to comment.