commit b7fe99b0f5c738d94c3268d4151bf64be433242c Author: decentral1se Date: Wed Aug 17 13:48:59 2022 +0200 init diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..480147b --- /dev/null +++ b/.env.sample @@ -0,0 +1,4 @@ +TYPE=rsshub + +DOMAIN=rsshub.example.com +LETS_ENCRYPT_ENV=production diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a6353d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.envrc diff --git a/README.md b/README.md new file mode 100644 index 0000000..caec46f --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# rsshub + +> An open source, easy to use, and extensible RSS feed aggregator, it's capable +> of generating RSS feeds from pretty much everything. + + + +* **Category**: Apps +* **Status**: 0 +* **Image**: [`diygod/rsshub`](https://hub.docker.com/r/rsshub), 4, upstream +* **Healthcheck**: No +* **Backups**: No +* **Email**: No +* **Tests**: No +* **SSO**: No + + + +## Quick start + +* `abra app new rsshub --secrets` +* `abra app config ` +* `abra app deploy ` + +For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech). diff --git a/abra.sh b/abra.sh new file mode 100644 index 0000000..7c5fe57 --- /dev/null +++ b/abra.sh @@ -0,0 +1 @@ +export APP_ENTRYPOINT_VERSION=v1 diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..6ae993c --- /dev/null +++ b/compose.yml @@ -0,0 +1,56 @@ +--- +version: "3.8" + +services: + app: + image: "diygod/rsshub:2022-08-17" + environment: + - NODE_ENV=production + - CACHE_TYPE=redis + - REDIS_URL="redis://redis:6379/" + - PUPPETEER_WS_ENDPOINT="ws://browserless:3000" + networks: + - proxy + - internal + configs: + - source: app_entrypoint + target: /docker-entrypoint.sh + mode: 0555 + entrypoint: /docker-entrypoint.sh + command: npm run start + deploy: + restart_policy: + condition: on-failure + labels: + - "traefik.enable=true" + - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=1200" + - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" + - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" + - "coop-cloud.${STACK_NAME}.version=2022-08-17+0.1.0" + + browserless: + image: browserless/chrome + networks: + - internal + + redis: + image: redis:alpine + networks: + - internal + volumes: + - redis_data:/data + +volumes: + - redis_data + +networks: + internal: + proxy: + external: true + +configs: + app_entrypoint: + name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION} + file: entrypoint.sh.tmpl + template_driver: golang diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl new file mode 100644 index 0000000..de69af8 --- /dev/null +++ b/entrypoint.sh.tmpl @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + + if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + + local val="$def" + + if [ "${!var:-}" ]; then + val="${!var}" + elif [ "${!fileVar:-}" ]; then + val="$(< "${!fileVar}")" + fi + + export "$var"="$val" + unset "$fileVar" +} + +# upstream startup command +# https://raw.githubusercontent.com/DIYgod/RSSHub/master/Dockerfile +dumb-init --