From 55d894b6360ab4983055d9f16babb947756bf0a2 Mon Sep 17 00:00:00 2001 From: coolfool Date: Thu, 3 Feb 2022 23:23:50 +0530 Subject: [PATCH] Added readme and documentation --- .gitignore | 1 + .goreleaser.yaml | 34 ++++++++++ Dockerfile | 2 +- README.md | 170 ++++++++++++++++++++++++++++++++++++++++++++++- app.json | 4 +- logo.png | Bin 0 -> 6957 bytes 6 files changed, 207 insertions(+), 4 deletions(-) create mode 100644 .goreleaser.yaml create mode 100644 logo.png diff --git a/.gitignore b/.gitignore index 394af23..7ce1b07 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .env dist docker-compose-dev.yml +!.goreleaser.yaml !.github !/.gitignore !/.dockerignore diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..80255da --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,34 @@ +project_name: flareup +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + main: ./cmd/flareup + goarch: + - amd64 + - arm64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +release: + draft: true + prerelease: auto + mode: append + name_template: "{{.ProjectName}}-v{{.Version}}" + disable: false + + + diff --git a/Dockerfile b/Dockerfile index 0a328c4..987ffcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,4 @@ RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /src ./cmd/flareup FROM alpine COPY --from=build /src/flareup /bin -CMD ["/bin/flareup"] \ No newline at end of file +CMD ["/bin/flareup"] diff --git a/README.md b/README.md index b82c20e..ec97824 100644 --- a/README.md +++ b/README.md @@ -1 +1,169 @@ -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coolfool/flareup) \ No newline at end of file +
+ flareup logo +

Self-hosted and Easy-to-deploy Cloudflare based Dynamic DNS service for router

+
+ +## Contents +- [Features](#Features) +- [Environment Variables](#Environment-Variables) +- [Installation](#Installation) + - [Heroku](#Heroku) + - [Docker (Run and Compose)](#Docker) + - [Standalone Binaries](#Standalone-Binaries) +- [Router Setup](#Router-Setup) +- [Build and Run Locally](#Build-and-Run-Locally) +- [Contributing](#Contributing) +- [Authors](#Authors) +- [License](#License) + + +## Features + +- Easy-to-use heroku one click deploy +- Support for multiple domains +- Flexible in terms deploying and installing options +- Single multi-arch docker image +- Multi platform binaries + + +## Environment Variables + +To run this project, you will need to add the following environment variables to your .env file (or) set them accordingly for use with docker or with your os + + +`USERNAME` - Username for flareup service + +`PASSWORD` - Password for flareup service + +`CF_API_TOKEN` - Cloudflare api token with edit permission for required zones i.e domains + +`PORT` (Optional) - By default flareup listen's on port 5335 + +`DOMAINS` - Comma(,) seperated domains e.g + ``` + example1.domain.tld , example2.domain.tld + ``` + +`PROXIED` (Optional, Default:`false`) - Proxy dns service through cloudflare service + +

(back to top)

+ +## Installation +- FlareUp can be installed and used in the following ways + +## Heroku +- Click [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coolfool/flareup) and its pretty self explanatory. +

(back to top)

+ +## Docker +1) ### Docker Run + 1) To automatically install & run FlareUp, simply run: + ``` + docker run -d \ + --name=flareup \ + -e USERNAME= \ + -e PASSWORD= \ + -e CF_API_TOKEN= \ + -e DOMAINS= \ + -e PROXIED=false \ + -p 5335:5335 \ + --restart unless-stopped \ + coolfool/flareup + ``` + 2) Logs can be found using + ``` + docker container logs flareup + ``` + +2) ### Docker Compose + 1) Download [docker-compose.yml]() + 2) Open the file in a text editor and fill the environment variables + 3) Execute the following command in the same directory + ``` + docker-compose up -d + ``` + 4) FlareUp should start listening on `5335` or the port specified in env vars. +

(back to top)

+ +## Standalone Binaries +1) Download the binary for your platform from Releases section +2) Extract the archive +3) Run the binary according to your os + - For linux + ``` + ./flareup + ``` +

(back to top)

+ +## Router Setup +* Important Notes before setup: + 1) The flareup update url is `https://example.com/update` + 2) If the router insists on having a hostname for update you can use + `https://example.com/update?hostname=all.flareup` as url and `all.flareup` as hostname + +1) The DynamicDNS server will be the hostname where the service is hosted eg. `example.com` +2) Fill the username and password as you entered in environment variable +3) Enter the hostname as `all.flareup` if required +4) The update urls are as follows: + 1) `https://example.com/update` without hostname + 2) `https://example.com/update?hostname=all.flareup` with hostname + +5) Save settings and the service should start updating cloudflare dns +

(back to top)

+ +## Build and Run Locally + +1) Clone the project + +```bash + git clone https://github.com/CoolFool/flareup +``` + +2) Go to the project directory + +```bash + cd flareup +``` + +3) Install dependencies + +```bash + go build -o flareup ./cmd/flareup +``` + +4) Create .env file according to the variables mentioned in [Environment Variables](#Environment-Variables) + +5) Start the service according to your platform +- For linux + ```bash + ./flareup + ``` +

(back to top)

+ +## Contributing + +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". +Don't forget to give the project a star! Thanks again! + +1. Fork the Project +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) +4. Push to the Branch (`git push origin feature/AmazingFeature`) +5. Open a Pull Request + +

(back to top)

+ + +## Authors + +- [@coolfool](https://www.github.com/coolfool) + +

(back to top)

+ +## License + +[MIT](https://choosealicense.com/licenses/mit/) + +

(back to top)

diff --git a/app.json b/app.json index 12f5ee4..c368dc5 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,7 @@ { "name": "flareUp", - "description": "Self-Hosted Cloudflare based DynamicDNS service for router", - "repository": "https://github.com/CoolFool/flareup", + "description": "Self-hosted and Easy-to-deploy Cloudflare based Dynamic DNS service for router", + "repository": "https://github.com/CoolFool/flareup/blob/main/logo.png", "env":{ "USERNAME":{ "description" : "Username for flareup" diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e192a1a2a4460a99aad0e66365b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