fix(tui): make tui work from docker image
All checks were successful
Rust / build (push) Successful in 6m13s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 2m26s

Add missing environment variable in Dockerfile and gave example command
to run via docker.

Closes kemitix/git-next#154
This commit is contained in:
Paul Campbell 2024-09-12 18:49:16 +01:00
parent df6b96fbfd
commit 664e424d1a
2 changed files with 13 additions and 0 deletions

View file

@ -28,5 +28,7 @@ RUN apt-get update && \
USER 1000 USER 1000
COPY --from=builder /app/target/release/git-next /usr/local/bin COPY --from=builder /app/target/release/git-next /usr/local/bin
ENV HOME=/app
ENTRYPOINT [ "/usr/local/bin/git-next" ] ENTRYPOINT [ "/usr/local/bin/git-next" ]
CMD [ "server", "start" ] CMD [ "server", "start" ]

View file

@ -8,6 +8,17 @@ The build `git-next` with the Terminal UI use: `cargo install git-next --feature
To run `git-next` with the Terminal UI use: `git-next server start --ui` To run `git-next` with the Terminal UI use: `git-next server start --ui`
### Docker
If using the docker image you will need to create a directory to mount that contains the
`git-next-server.toml` file. Mount this directory as `/app`. In the example below we use
the current directory for this.
If you want to persist the clones of your monitored repos then point `storage.path` in
`git-next-server.toml` to the the directory `/app`, (e.g. `path = "/app/data"`).
`docker run -it -v .:/app/ git.kemitix.net/kemitix/git-next:latest server start --ui`
## logs ## logs
When the Terminal UI is enabled via the `--ui` parameter, logs are written to the file: When the Terminal UI is enabled via the `--ui` parameter, logs are written to the file: