From 6c7244077b210e1afc7f70c7b1e647289b0dff53 Mon Sep 17 00:00:00 2001 From: Jerome Gravel-Niquet Date: Thu, 27 May 2021 13:44:09 -0400 Subject: [PATCH] Add instructions to deploy to Fly.io --- README.md | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6f914ad..49ea29a 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,10 @@ Contents 2. [Repl.it](#b-replit) 3. [pipx](#c-pipx) 4. [pip](#d-pip) - 5. [Manual](#e-manual) - 6. [Docker](#f-manual-docker) - 7. [Arch/AUR](#arch-linux--arch-based-distributions) + 5. [Fly.io](#e-flyio) + 6. [Manual](#f-manual) + 7. [Docker](#g-manual-docker) + 8. [Arch/AUR](#arch-linux--arch-based-distributions) 4. [Environment Variables and Configuration](#environment-variables) 5. [Usage](#usage) 6. [Extra Steps](#extra-steps) @@ -126,7 +127,33 @@ optional arguments: ``` See the [available environment variables](#environment-variables) for additional configuration. -### E) Manual +### E) [Fly.io](https://fly.io) + +You will need a [Fly.io](https://fly.io) account to do this. Fly requires a credit card to deploy anything, but you can have up to 3 shared-CPU VMs running full-time each month for free. + +#### Install the CLI: + +```bash +curl -L https://fly.io/install.sh | sh +``` + +#### Deploy your app + +```bash +fly apps create --org personal --port 5000 +# Choose a name and the Image builder +# Enter `benbusby/whoogle-search:latest` as the image name +fly deploy +``` + +Your app is now available at `https://.fly.dev`. + +You can customize the `fly.toml`: +- Remove the non-https service +- Add environment variables under the `[env]` key + - Use `fly secrets set NAME=value` for more sensitive values like `WHOOGLE_PASS` and `WHOOGLE_PROXY_PASS`. + +### F) Manual Clone the repo and run the following commands to start the app in a local-only environment: ```bash @@ -183,7 +210,7 @@ sudo systemctl enable whoogle sudo systemctl start whoogle ``` -### F) Manual (Docker) +### G) Manual (Docker) 1. Ensure the Docker daemon is running, and is accessible by your user account - To add user permissions, you can execute `sudo usermod -aG docker yourusername` - Running `docker ps` should return something besides an error. If you encounter an error saying the daemon isn't running, try `sudo systemctl start docker` (Linux) or ensure the docker tool is running (Windows/macOS).