mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-01-26 19:03:33 +00:00
Merge pull request #741 from Era-Dorta/contributing-readme
docs: add contributing.md and additional instructions on building the docs
This commit is contained in:
commit
cfc652dfbc
30
CONTRIBUTING.md
Normal file
30
CONTRIBUTING.md
Normal file
@ -0,0 +1,30 @@
|
||||
# Contributing
|
||||
|
||||
Contributions are welcome, including bug reports, implementing features or writing documentation.
|
||||
|
||||
## Dev Environment Setup
|
||||
|
||||
The recommended way is to use docker compose:
|
||||
|
||||
1. In the `docker-compose.yml` replace the `image: bbernhard/signal-cli-rest-api:latest` for `build: "."`
|
||||
|
||||
The development workflow is:
|
||||
|
||||
1. Make changes in the source code.
|
||||
2. Build the image and run a container.
|
||||
```bash
|
||||
docker compose build
|
||||
```
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
3. Test the changes.
|
||||
4. Bring the container down.
|
||||
```bash
|
||||
docker compose down
|
||||
```
|
||||
4. Repeat as many times as needed.
|
||||
|
||||
## 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
|
||||
swag init
|
||||
```
|
||||
```
|
||||
|
||||
Then run the app in `/src`
|
||||
|
||||
```bash
|
||||
go run main.go
|
||||
```
|
||||
|
||||
Or with docker compose in the root of the repository
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
Then 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