Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create deployment instructions for Render #236

Merged
merged 4 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<a href="https://render.com/deploy?repo=https://github.com/wabarc/on-render">
<img
src="https://render.com/images/deploy-to-render-button.svg"
alt="Deploy to Render"
width="155px"
/>
</a>

## 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

Expand Down
27 changes: 27 additions & 0 deletions build/docker/Dockerfile.render
Original file line number Diff line number Diff line change
@@ -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"]
19 changes: 19 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -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