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: bind sequence token path to host for persistence #88

Merged
merged 10 commits into from
Apr 19, 2024
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
COUCHDB_HOST: "couchdb"
COUCHDB_PORT: 5984
COUCHDB_SECURE: false
COUCHDB_SEQ: /tmp/couchdb/sequence_path.txt
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
node_modules
.idea
*/coverage/*
logstash/sequence_path.txt
11 changes: 11 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.7'

services:
logstash:
image: medicmobile/cht-logstash-couchdb:latest
build: ./logstash/
restart: always
volumes:
- type: bind
source: ./logstash
target: /tmp/couchdb
1 change: 1 addition & 0 deletions logstash/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rm "${TEMPLATE_FILE}"

if [[ -f "${COUCHDB_SEQ}" && -s "${COUCHDB_SEQ}" ]]; then
echo "Using existing sequence file"
echo "Current sequence: $(cat ${COUCHDB_SEQ})"
else
mkdir -p `dirname ${COUCHDB_SEQ}` \
&& chown -R $USER.$USER `dirname ${COUCHDB_SEQ}` \
Expand Down
Loading