Skip to content

Commit

Permalink
Merge pull request #8 from ralatsdc/rl/upstream-use-common-environmen…
Browse files Browse the repository at this point in the history
…t-variable-names

Use common environment variable names
  • Loading branch information
robotastic authored Feb 22, 2024
2 parents 00be742 + a204d1c commit b153eb5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion example.env → couchdb-startup.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ DEVICE_IP=<DEVICE_IP>
# Set this value to true if running the docker install for a mobile device.
# Set it to false when running it for a CouchDB sync server

PERIPHERAL=true
PERIPHERAL=true
1 change: 1 addition & 0 deletions couchdb-startup/couchdbinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
while [ "$(curl -s -o /dev/null -w ''%{http_code}'' couchdb-server:5984)" != "200" ]; do sleep 5; done

# Create system tables and table "aisonobuoy" which is used for synching all data from devices
# TODO: Do not hardcode CouchDB server IP?
curl -X PUT http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb-server:5984/_users
curl -X PUT http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb-server:5984/_replicator
curl -X PUT http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb-server:5984/_global_changes
Expand Down
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ services:
context: ./couchdb-startup
dockerfile: ./Dockerfile
restart: "unless-stopped"
env_file:
- .env
depends_on:
- couchdb-server
logging:
driver: "json-file"
options:
max-size: "10M"
max-file: "10"
max-file: "10"
depends_on:
- couchdb-server
env_file:
- path: ./couchdb-startup.env
required: false

0 comments on commit b153eb5

Please sign in to comment.