diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..736cf22 --- /dev/null +++ b/CONTRIBUTING.md @@ -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). \ No newline at end of file diff --git a/src/docs/README.md b/src/docs/README.md index eb559cb..0117eff 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 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 \ No newline at end of file