From 3bafde7ab1e86c74f624c3f46e9065cbc8a2c99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Sun, 4 Oct 2020 11:52:52 +0200 Subject: [PATCH] fix: adapt docker image to new config format --- Dockerfile | 11 +++++------ README.md | 2 +- version.txt | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index b550801..91e8863 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN cd /src && go build -o wakapi # Final Stage # When running the application using `docker run`, you can pass environment variables -# to override config values from .env using `-e` syntax. +# to override config values using `-e` syntax. # Available options are: # – WAKAPI_DB_TYPE # – WAKAPI_DB_USER @@ -22,7 +22,7 @@ RUN cd /src && go build -o wakapi FROM debian WORKDIR /app -ENV ENV prod +ENV ENVIRONMENT prod ENV WAKAPI_DB_TYPE sqlite3 ENV WAKAPI_DB_USER '' ENV WAKAPI_DB_PASSWORD '' @@ -31,12 +31,11 @@ ENV WAKAPI_DB_NAME=/data/wakapi.db ENV WAKAPI_PASSWORD_SALT '' COPY --from=build-env /src/wakapi /app/ -COPY --from=build-env /src/config.ini /app/ +COPY --from=build-env /src/config.default.yml /app/config.yml COPY --from=build-env /src/version.txt /app/ -COPY --from=build-env /src/.env.example /app/.env -RUN sed -i 's/listen = 127.0.0.1/listen = 0.0.0.0/g' /app/config.ini -RUN sed -i 's/insecure_cookies = false/insecure_cookies = true/g' /app/config.ini +RUN sed -i 's/listen_ipv4: 127.0.0.1/listen_ipv4: 0.0.0.0/g' /app/config.yml +RUN sed -i 's/insecure_cookies: false/insecure_cookies: true/g' /app/config.yml ADD static /app/static ADD data /app/data diff --git a/README.md b/README.md index 3e7e85b..fb4d439 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ To use the demo version set `api_url = https://apps.muetsch.io/wakapi/api/heartb docker run -d -p 3000:3000 --name wakapi n1try/wakapi ``` -By default, SQLite is used as a database. To run Wakapi in Docker with MySQL or Postgres, see [Dockerfile](https://github.com/muety/wakapi/blob/master/Dockerfile) and [.env.example](https://github.com/muety/wakapi/blob/master/.env.example) for further options. +By default, SQLite is used as a database. To run Wakapi in Docker with MySQL or Postgres, see [Dockerfile](https://github.com/muety/wakapi/blob/master/Dockerfile) and [config.default.yml](https://github.com/muety/wakapi/blob/master/config.default.yml) for further options. ## 🔧 Configuration You can specify configuration options either via a config file (default: `config.yml`, customziable through the `-c` argument) or via environment variables. Here is an overview of all options. diff --git a/version.txt b/version.txt index 32bd932..6f165bc 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.12.0 \ No newline at end of file +1.12.1 \ No newline at end of file