diff --git a/README.md b/README.md index eb63eb3..d9e3f16 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,6 @@ It can be used in a `docker-compose.yml` file : 3. Opengist is now running on port 6157, you can browse http://localhost:6157 ```yml -version: "3" - services: opengist: image: ghcr.io/thomiceli/opengist:1.7 diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 339d02d..548a4a8 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -9,4 +9,10 @@ usermod -o -u "$UID" $USER chown -R "$USER:$USER" /opengist chown -R "$USER:$USER" /config.yml +if [ -f "/run/secrets/opengist_secrets" ]; then + set -a + . /run/secrets/opengist_secrets + set +a +fi + exec su $USER -c "OG_OPENGIST_HOME=/opengist /app/opengist/opengist --config /config.yml" diff --git a/docs/configuration/configure.md b/docs/configuration/configure.md index f3fb4f7..0513e6a 100644 --- a/docs/configuration/configure.md +++ b/docs/configuration/configure.md @@ -46,3 +46,27 @@ Usage via command line : ```shell OG_LOG_LEVEL=info ./opengist ``` + +### Using Docker Compose secrets + +You can use Docker Compose secrets to not expose sensitive information in your compose file, using a `.env` file. + +```dotenv +# file secrets.env +OG_GITLAB_CLIENT_KEY=your_gitlab_client_key +OG_GITLAB_SECRET=your_gitlab_secret_key +``` + +And then use it in your compose file : + +```yml +services: + opengist: + # ... + secrets: + - opengist_secrets + +secrets: + opengist_secrets: + file: ./secrets.env +``` \ No newline at end of file diff --git a/docs/configuration/databases/mysql.md b/docs/configuration/databases/mysql.md index 589043d..5b71cfb 100644 --- a/docs/configuration/databases/mysql.md +++ b/docs/configuration/databases/mysql.md @@ -18,8 +18,6 @@ OG_DB_URI=mysql://root:passwd@localhost:3306/opengist_db ### Docker Compose ```yml -version: "3" - services: opengist: image: ghcr.io/thomiceli/opengist:1 diff --git a/docs/configuration/databases/postgresql.md b/docs/configuration/databases/postgresql.md index 2c7cb98..0b19264 100644 --- a/docs/configuration/databases/postgresql.md +++ b/docs/configuration/databases/postgresql.md @@ -18,8 +18,6 @@ OG_DB_URI=postgres://postgres:passwd@localhost:5432/opengist_db ### Docker Compose ```yml -version: "3" - services: opengist: image: ghcr.io/thomiceli/opengist:1 diff --git a/docs/configuration/databases/sqlite.md b/docs/configuration/databases/sqlite.md index cadf90a..0e07ad3 100644 --- a/docs/configuration/databases/sqlite.md +++ b/docs/configuration/databases/sqlite.md @@ -21,8 +21,6 @@ OG_SQLITE_JOURNAL_MODE=WAL ### Docker Compose ```yml -version: "3" - services: opengist: image: ghcr.io/thomiceli/opengist:1 diff --git a/docs/installation/docker.md b/docs/installation/docker.md index a1f0fcd..e8536e9 100644 --- a/docs/installation/docker.md +++ b/docs/installation/docker.md @@ -13,8 +13,6 @@ It can be used in a `docker-compose.yml` file : 3. Opengist is now running on port 6157, you can browse http://localhost:6157 ```yml -version: "3" - services: opengist: image: ghcr.io/thomiceli/opengist:1