mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-20 13:44:17 +00:00
docs: add contributing.md and additional instructions on building the docs.
This commit is contained in:
parent
221762b935
commit
3eb3db0a9f
28
CONTRIBUTING.md
Normal file
28
CONTRIBUTING.md
Normal 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).
|
||||||
@ -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
|
||||||
Loading…
x
Reference in New Issue
Block a user