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

Use Docker secrets #340

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
24 changes: 24 additions & 0 deletions docs/configuration/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 0 additions & 2 deletions docs/configuration/databases/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/configuration/databases/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/configuration/databases/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ OG_SQLITE_JOURNAL_MODE=WAL

### Docker Compose
```yml
version: "3"

services:
opengist:
image: ghcr.io/thomiceli/opengist:1
Expand Down
2 changes: 0 additions & 2 deletions docs/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading