diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..042b96b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contributing + +Contributions are welcome, including bug reports, implementing features or writing documentation. + +## Dev Environment Setup + +The recommended way is: + +1. Build the docker image, setting the version to a number of your choosing + ```bash + docker build --network=host --tag bbernhard/signal-cli-rest-api: . + ``` +2. Adjust the `docker-compose.yml` + * Replace the `image: bbernhard/signal-cli-rest-api:latest` for `image: bbernhard/signal-cli-rest-api:` + * Add the version to the environment: + ```yml + environment: + - BUILD_VERSION= + ``` +3. Run the image + ```bash + docker compose up + ``` +4. Make code changes and repeat steps 1 to 3 + +## Building the documentation + +Follow the instructions in the docs [readme page](./src/docs/README.md). \ No newline at end of file diff --git a/src/docs/README.md b/src/docs/README.md index eb559cb..ba491b6 100644 --- a/src/docs/README.md +++ b/src/docs/README.md @@ -10,4 +10,23 @@ Or, if you have `swag` installed: ```bash swag init -``` \ No newline at end of file +``` + +Then run the app in `/src` + +```bash +go run main.go +``` + +Or with the docker compose in the root of the repository +```bash +docker compose up +``` + +And navigate to the following address to view the docs + +http://127.0.0.1:8080/swagger/index.html + +On docker you'll get a Network error, replace the IP for the docker internal IP in the error, e.g: + +http://172.18.0.2:8080/swagger/index.html \ No newline at end of file