From fe0149caa9a1ec9c7c97bb67f318001d52e37029 Mon Sep 17 00:00:00 2001 From: Wayback Archiver <66856220+waybackarchiver@users.noreply.github.com> Date: Wed, 30 Nov 2022 15:23:17 +0000 Subject: [PATCH] Create deployment instructions for Render (#236) * Update README.md * Add render.yaml * Update CHANGELOG.md --- CHANGELOG.md | 1 + README.md | 8 ++++++++ build/docker/Dockerfile.render | 27 +++++++++++++++++++++++++++ render.yaml | 19 +++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 build/docker/Dockerfile.render create mode 100644 render.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index c12571b1..5fec76ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Sign images using cosign - Replace set-output with recommended env output ([#234](https://github.com/wabarc/wayback/pull/234)) +- Create deployment instructions for Render ([#236](https://github.com/wabarc/wayback/pull/236)) - Specify dependencies for the distribution package ([#243](https://github.com/wabarc/wayback/pull/243)) ## [0.18.1] - 2022-10-30 diff --git a/README.md b/README.md index ba1c4e81..9df8218c 100644 --- a/README.md +++ b/README.md @@ -292,11 +292,19 @@ docker run -d wabarc/wayback wayback -d telegram -t YOUR-BOT-TOKEN -c YOUR-CHANN ### 1-Click Deploy [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/wabarc/wayback) + + Deploy to Render + ## Deployment - [wabarc/on-heroku](https://github.com/wabarc/on-heroku) - [wabarc/on-github](https://github.com/wabarc/on-github) +- [wabarc/on-render](https://github.com/wabarc/on-render) ## TODO diff --git a/build/docker/Dockerfile.render b/build/docker/Dockerfile.render new file mode 100644 index 00000000..5bfe3f4a --- /dev/null +++ b/build/docker/Dockerfile.render @@ -0,0 +1,27 @@ +# Copyright 2022 Wayback Archiver. All rights reserved. +# Use of this source code is governed by the GNU GPL v3 +# license that can be found in the LICENSE file. +# +# syntax=docker/dockerfile:1.2 +ARG WAYBACK_IMAGE_TAG=latest-bundle + +FROM ghcr.io/wabarc/wayback:${WAYBACK_IMAGE_TAG} + +ENV BASE_DIR /wayback +ENV WAYBACK_TOR_LOCAL_PORT 80 + +WORKDIR ${BASE_DIR} + +RUN set -ex; \ + chown wayback:nogroup /var/log/tor; \ + chown wayback:nogroup /var/lib/tor; \ + \ + setcap 'cap_net_bind_service=+ep' /usr/local/bin/wayback; \ + \ + sed -i 's/User/#User/g' /etc/tor/torrc + +USER wayback + +EXPOSE 80 + +CMD ["/usr/local/bin/wayback", "-d", "web"] diff --git a/render.yaml b/render.yaml new file mode 100644 index 00000000..8d251f4f --- /dev/null +++ b/render.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Wayback Archiver. All rights reserved. +# Use of this source code is governed by the GNU GPL v3 +# license that can be found in the LICENSE file. +# +# More details see https://render.com/docs/blueprint-spec + +services: + - type: web + name: wayback-starter + plan: free + env: docker + autoDeploy: false + healthCheckPath: /healthcheck + dockerfilePath: ./build/docker/Dockerfile.render + envVars: + - key: PORT + value: 80 + - key: WAYBACK_IPFS_APIKEY + sync: false