Skip to content

Conversation

@GlancingMind
Copy link
Owner

No description provided.

Add .gitattributes

Using .gitattributes to normalize line endings for this project.
Developers might set the core.autocrlf option in their respective git-config
to treat line endings properly. But if forgotten, different line endings could
be introduced to a file, which possible leads to unexpected behaviour.
With this settings, git should try to set the proper line endings for files on
each commit or checkout.

Add .editorconfig

This should set some sane defaults for some file in this project.
E.g. ensure that editors use tab for indention in Makefiles.
'--host'-cmdline-option is added to the webui command.

Previously, the WebUI couldn't be hosted inside of a container. As the
WebUI-server only listend per default to localhost and there was no
option to change the address, the server should listend to. This means,
that the WebUI was only reachable from localhost. So only from inside of
the container but never from outside.
The '--host'-option allows to set the IP address or a hostname
which the WebUI-server should listen to. E.g. by setting 0.0.0.0 or ::
as address.

Update documentation for new option.

Update shell completion for new option.
The Dockerfile specifies a container image, which only contains the
git-bug statically compiled binary and a preconfigured issue-repository.

- Statical compilation is required to run the git-bug binary on the
  scratch image, which reduces the size of the final container image.
- The included issue-repository allows the user of the image to try
  git-bug without the initial setup of a git repository and a git-bug
  idenentity.

The final container image will use the ca-certificates of the golang
image. This certificates are required to pull or push issues to/from
configured git-bug bridges.

Update installation and usage instructions for container image.
Also add a container image build status badge to README.
This commit introduces a docker-compose file to reduce the setup for the
webui development.

The compose-file defines two containers. One for the GraphQL-backend and
another nodejs container for the development webui (dev-webui). With
this, it is no longer required to install go for compiling the git-bug
binary to start the dev-webui. A developer is only required to have
docker-compose installed to spin up the webui in development mode with
one command.

To support running the dev-webui inside a container, the proxy of the
dev-webui has to communicate with the backend-container instance.
Before this commit, the proxy listend to localhost, which prevented it
from communicating with the backend-container.
Changing the proxy URL to the backend-container IP or name, would be
fragile and certainly break the dev-webui for developers not using
docker-compose. So to support docker-compose gracefully, an
environmental variable is introduced which per default points to the
address of localhost and can be overwritten by docker-compose to the
backend-container instance.
As the proxy setting in package.json doesn't allow to retrieve it's
value from environmental variables, it has to be replaced by a more
capable solution - setupProxy.js.

NOTE: It would have been also possible to use the host-networkmode in
docker-compose. But platforms, which don't run containers natively,
might require additional steps to work.

The hosts node_modules directory is ignored and not mapped into the
webui-container. Instead the webui-container will download the
node_modules itself into a container-volume. This prevents the usage of
host dependent node_modules and should make the development environment
more reproducable.

The git-bug keyring directory is persistet via a container volume.
Furthermore by setting the KEYRING environmental variable in the .env-file, a
directory can be mounted to persist tokens at the container-host or provide
already persisted tokens from the host to the container.

Below are some additional files (changes):

- Add .env file to set the issue-repository for the GraphQL-backend
  service without changing the docker-compose.yml file.

- Reduce download size for docker build, by reducing npm install
  invokations through better cache use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants