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

config.yml with Docker #131

Merged
merged 1 commit into from
Oct 15, 2023
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: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ RUN apk update && \
RUN addgroup -S opengist && \
adduser -S -G opengist -H -s /bin/ash -g 'Opengist User' opengist

COPY --from=build --chown=opengist:opengist /opengist/config.yml config.yml

WORKDIR /app/opengist

COPY --from=build --chown=opengist:opengist /opengist/opengist .
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ chmod +x opengist
./opengist # with or without `--config config.yml`
```

Opengist is now running on port 6157, you can browse http://localhost:6157

### From source

Requirements : [Git](https://git-scm.com/downloads) (2.20+), [Go](https://go.dev/doc/install) (1.20+), [Node.js](https://nodejs.org/en/download/) (16+)
Expand Down
3 changes: 2 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ groupmod -o -g "$GID" $USER
usermod -o -u "$UID" $USER

chown -R "$USER:$USER" /opengist
chown -R "$USER:$USER" /config.yml

exec su $USER -c "OG_OPENGIST_HOME=/opengist /app/opengist/opengist"
exec su $USER -c "OG_OPENGIST_HOME=/opengist /app/opengist/opengist --config /config.yml"
14 changes: 12 additions & 2 deletions docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ The [configuration cheat sheet](cheat-sheet.md) lists all available configuratio
The configuration file must be specified when launching the application, using the `--config` flag followed by the path
to your YAML file.

Usage with Docker Compose :
```yml
services:
opengist:
# ...
volumes:
# ...
- "/path/to/config.yml:/config.yml"
```

Usage via command line :
```shell
./opengist --config /path/to/config.yml
```
Expand All @@ -22,7 +33,6 @@ You can start by copying and/or modifying the provided [config.yml](/config.yml)
## Configuration via Environment Variables

Usage with Docker Compose :

```yml
services:
opengist:
Expand All @@ -31,8 +41,8 @@ services:
OG_LOG_LEVEL: "info"
# etc.
```
Usage via command line :

Usage via command line :
```shell
OG_LOG_LEVEL=info ./opengist
```