docs: add contributing.md and additional instructions on building the docs.

This commit is contained in:
Era Dorta 2025-08-29 20:19:25 +02:00
parent 221762b935
commit 3eb3db0a9f
2 changed files with 48 additions and 1 deletions

28
CONTRIBUTING.md Normal file
View File

@ -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:<a dev version> .
```
2. Adjust the `docker-compose.yml`
* Replace the `image: bbernhard/signal-cli-rest-api:latest` for `image: bbernhard/signal-cli-rest-api:<a dev version>`
* Add the version to the environment:
```yml
environment:
- BUILD_VERSION=<a dev 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).

View File

@ -10,4 +10,23 @@ Or, if you have `swag` installed:
```bash ```bash
swag init swag init
``` ```
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