From 882ca021ce62913f1069b7eab374c99455287a42 Mon Sep 17 00:00:00 2001 From: bob Date: Fri, 8 Oct 2021 23:01:00 +0200 Subject: [PATCH 1/2] Made dockerfile able to run without local repo --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf3e1c5..2d6044a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ FROM couchdb:3.1.1 -COPY couchdb/views.json /tmp/ -COPY couchdb/docker-entrypoint.sh /usr/local/bin/ -COPY couchdb/bbrf-init.sh /usr/local/bin/ +ADD https://raw.githubusercontent.com/honoki/bbrf-server/main/couchdb/views.json /tmp/ +ADD https://raw.githubusercontent.com/honoki/bbrf-server/main/couchdb/docker-entrypoint.sh /usr/local/bin/ +ADD https://raw.githubusercontent.com/honoki/bbrf-server/main/couchdb/bbrf-init.sh /usr/local/bin/ -RUN apt-get install -y curl \ No newline at end of file +RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \ + chmod +x /usr/local/bin/bbrf-init.sh + +RUN apt-get install -y curl From b883ff5054f6c5af75f72a523f015252706a8711 Mon Sep 17 00:00:00 2001 From: bob Date: Fri, 8 Oct 2021 23:02:05 +0200 Subject: [PATCH 2/2] Made the couchdb an env variable --- couchdb/bbrf-init.sh | 2 +- docker-compose.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/couchdb/bbrf-init.sh b/couchdb/bbrf-init.sh index 38925ea..6a9cdd0 100755 --- a/couchdb/bbrf-init.sh +++ b/couchdb/bbrf-init.sh @@ -2,7 +2,7 @@ sleep 10 -COUCHDB=http://couchdb:5984/ +COUCHDB=http://$COUCHDB_HOSTNAME:5984/ AUTH=$COUCHDB_USER:$COUCHDB_PASSWORD if [ -z "$BBRF_PASSWORD" ]; then diff --git a/docker-compose.yml b/docker-compose.yml index 0610a26..a50f229 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ services: - COUCHDB_USER=admin - COUCHDB_PASSWORD=admin # please please please replace this with a secure password - BBRF_PASSWORD=bbrf # please please please replace this with a secure password + - COUCHDB_HOSTNAME=couchdb volumes: - ./data/couchdb/1:/opt/couchdb/data proxy: @@ -19,4 +20,4 @@ services: - ./proxy/docker-entrypoint.d/:/docker-entrypoint.d/ - ./proxy/keys/:/etc/nginx/keys/ depends_on: - - couchdb \ No newline at end of file + - couchdb