mirror of
https://github.com/runcitadel/apps.git
synced 2024-11-14 09:50:22 +00:00
Add agora
This commit is contained in:
parent
a8a0acfb91
commit
ac657ca1b6
76
apps/agora/app.yml
Normal file
76
apps/agora/app.yml
Normal file
|
@ -0,0 +1,76 @@
|
|||
# SPDX-FileCopyrightText: 2022 Jonathan Zernik
|
||||
# SPDX-FileCopyrightText: 2022 Citadel and contributors
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
# yaml-language-server: $schema=../../app-standard-v4.yml
|
||||
|
||||
citadel_version: 4
|
||||
|
||||
metadata:
|
||||
category: Files
|
||||
name: Agora
|
||||
version: v0.1.2
|
||||
tagline: Sell your files for Bitcoin
|
||||
description: >-
|
||||
Agora is a project that allows anyone to sell files on the web for bitcoin using the Lightning Network.\n\nAgora serves the contents of a local directory, providing file listings and downloads over HTTP.
|
||||
For example, you can point it at a directory full of PDFs, allowing users to browse and view the PDFs in their web browser.
|
||||
If Agora is connected to an LND node, it can be configured to require Lightning Network payments for downloads.
|
||||
developers:
|
||||
Casey Rodarmor & Sönke Hahn: https://agora-org.github.io/agora/
|
||||
dependencies:
|
||||
- lnd
|
||||
repo:
|
||||
Public: https://github.com/agora-org/agora
|
||||
support: "https://t.me/agoradiscussion"
|
||||
port: 12080
|
||||
gallery: ["1.jpg", "2.jpg", "3.jpg"]
|
||||
path: /admin/
|
||||
defaultPassword: $APP_SEED
|
||||
|
||||
services:
|
||||
filebrowser:
|
||||
image: filebrowser/filebrowser:v2.21.1@sha256:6da71bfffc1345075a5cc06e0a7ae270098186407c62f4f71994e079677364d0
|
||||
user: 1000:1000
|
||||
restart: on-failure
|
||||
stop_grace_period: 1m
|
||||
mounts:
|
||||
data:
|
||||
data/files: /srv
|
||||
database/filebrowser.db: /database.db
|
||||
data/entrypoint.sh: /citadel-entrypoint.sh
|
||||
environment:
|
||||
APP_PASSWORD: "$APP_SEED"
|
||||
entrypoint: /citadel-entrypoint.sh
|
||||
|
||||
agora:
|
||||
image: ghcr.io/agora-org/agora:sha-bb037f2@sha256:ab5538638fa5c6c709c5dd295df1dd57e419abdbd2328075843ce6fbe0951820
|
||||
restart: on-failure
|
||||
stop_grace_period: 1m
|
||||
mounts:
|
||||
data:
|
||||
files: /files
|
||||
lnd: /lnd
|
||||
user: "1000:1000"
|
||||
environment:
|
||||
# LND environment variables
|
||||
LND_RPC_AUTHORITY: "$LND_IP:$LND_GRPC_PORT"
|
||||
TLS_CERT_PATH: "/lnd/tls.cert"
|
||||
INVOICES_MACAROON_PATH: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/invoice.macaroon"
|
||||
|
||||
# App specific environment variables
|
||||
FILES_DIR: "/files"
|
||||
AGORA_PORT: "8080"
|
||||
|
||||
nginx:
|
||||
image: nginx:1.21.6@sha256:2834dc507516af02784808c5f48b7cbe38b8ed5d0f4837f16e78d00deb7e7767
|
||||
init: true
|
||||
restart: on-failure
|
||||
mounts:
|
||||
data:
|
||||
data/nginx.conf: /etc/nginx/nginx.conf
|
||||
data/www: /usr/share/nginx/html
|
||||
port: 80
|
||||
depends_on:
|
||||
- agora
|
||||
- filebrowser
|
0
apps/agora/data/database/filebrowser.db
Normal file
0
apps/agora/data/database/filebrowser.db
Normal file
8
apps/agora/data/entrypoint.sh
Executable file
8
apps/agora/data/entrypoint.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Update configs
|
||||
/filebrowser config init
|
||||
/filebrowser config set --branding.name "Agora Admin"
|
||||
/filebrowser users add umbrel ${APP_PASSWORD}
|
||||
|
||||
exec /filebrowser -p 8080 --baseurl "/admin/files"
|
49
apps/agora/data/files/.gitkeep
Normal file
49
apps/agora/data/files/.gitkeep
Normal file
|
@ -0,0 +1,49 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
filebrowser:
|
||||
image: filebrowser/filebrowser:v2.21.1@sha256:6da71bfffc1345075a5cc06e0a7ae270098186407c62f4f71994e079677364d0
|
||||
user: 1000:1000
|
||||
restart: on-failure
|
||||
stop_grace_period: 1m
|
||||
volumes:
|
||||
- ${APP_DATA_DIR}/files:/srv
|
||||
- ${APP_DATA_DIR}/database/filebrowser.db:/database.db
|
||||
- ${APP_DATA_DIR}/data:/data
|
||||
environment:
|
||||
APP_PASSWORD: "$APP_PASSWORD"
|
||||
entrypoint: /data/entrypoint.sh
|
||||
|
||||
agora:
|
||||
image: ghcr.io/agora-org/agora:sha-48d3205@sha256:35eda120a8d868c7fa3b9cbdcad7cc2245b9fe7e0c5356c8091bb0bf9a65222d
|
||||
restart: on-failure
|
||||
stop_grace_period: 1m
|
||||
volumes:
|
||||
- ${APP_DATA_DIR}/files:/files
|
||||
- ${LND_DATA_DIR}:/lnd:ro
|
||||
user: "1000:1000"
|
||||
environment:
|
||||
# LND environment variables
|
||||
LND_RPC_AUTHORITY: "$LND_IP:$LND_GRPC_PORT"
|
||||
TLS_CERT_PATH: "/lnd/tls.cert"
|
||||
INVOICES_MACAROON_PATH: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/invoice.macaroon"
|
||||
|
||||
# App specific environment variables
|
||||
FILES_DIR: "/files"
|
||||
AGORA_PORT: 8080
|
||||
|
||||
nginx:
|
||||
image: nginx:1.19-alpine@sha256:c2ce58e024275728b00a554ac25628af25c54782865b3487b11c21cafb7fabda
|
||||
init: true
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- ${APP_DATA_DIR}/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ${APP_DATA_DIR}/data/www:/usr/share/nginx/html
|
||||
ports:
|
||||
- "$APP_AGORA_PORT:80"
|
||||
depends_on:
|
||||
- agora
|
||||
- filebrowser
|
||||
networks:
|
||||
default:
|
||||
ipv4_address: $APP_AGORA_IP
|
21
apps/agora/data/nginx.conf
Normal file
21
apps/agora/data/nginx.conf
Normal file
|
@ -0,0 +1,21 @@
|
|||
events { }
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
proxy_pass http://agora:8080;
|
||||
}
|
||||
|
||||
location /admin {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location /admin/files {
|
||||
proxy_pass http://filebrowser:8080;
|
||||
}
|
||||
}
|
||||
}
|
27
apps/agora/data/www/admin/index.html
Normal file
27
apps/agora/data/www/admin/index.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Agora Admin</title>
|
||||
<link rel="stylesheet" type="text/css" href="pico.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<main class="container container-fluid">
|
||||
<h1>Welcome to Agora Admin!</h1>
|
||||
<ul>
|
||||
<li><a href="/">Download files</a></li>
|
||||
<li>
|
||||
<a href='http://<!--#echo var="ssihiddenservice"-->'
|
||||
>Download files over Tor</a
|
||||
>
|
||||
</li>
|
||||
<li><a href="/admin/files">Upload and manage files</a></li>
|
||||
<li>
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/agora-org/agora#access-configuration"
|
||||
>Agora Configuration Docs</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
5
apps/agora/data/www/admin/pico.min.css
vendored
Normal file
5
apps/agora/data/www/admin/pico.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user