a simple example for pict-rs usage
Go to file
Aode (Lion) d2dbd8519c
Some checks reported errors
continuous-integration/drone/push Build is pending
continuous-integration/drone/tag Build was killed
Actix web 4.0 stable
2022-02-26 12:28:23 -06:00
.cargo Actix Web rc 1 2022-02-01 10:58:27 -06:00
docker Add console-subscriber, Update rust-runner tag format 2021-12-19 13:19:33 -06:00
images Images in readme 2020-06-17 18:33:45 -05:00
scss Add video playback support, fix upload page on small screens 2021-01-05 10:43:48 -06:00
src Actix Web rc 1 2022-02-01 10:58:27 -06:00
static favicon 2020-06-17 12:25:57 -05:00
templates Clippy lints 2021-09-12 11:27:22 -05:00
.drone.yml Update to latest actix web 2021-12-28 10:55:20 -06:00
.gitignore Working noscript-compatible pict-rs frontend 2020-06-13 16:23:43 -05:00
Cargo.lock Actix web 4.0 stable 2022-02-26 12:28:23 -06:00
Cargo.toml Actix web 4.0 stable 2022-02-26 12:28:23 -06:00
LICENSE Working noscript-compatible pict-rs frontend 2020-06-13 16:23:43 -05:00
README.md README: master -> main 2021-09-08 16:22:33 -05:00

pict-rs-proxy

a demo frontend for pict-rs supporting noscript

Index page Upload page

Usage

Running

pict-rs-proxy 0.1.0

USAGE:
    pict-rs-proxy [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -a, --addr <addr>            The address and port the server binds to [env: PICTRS_PROXY_ADDR=]  [default:
                                 0.0.0.0:8081]
    -d, --domain <domain>        The scheme, domain, and optional port of the pict-rs proxy server [env:
                                 PICTRS_PROXY_DOMAIN=]  [default: http://localhost:8081]
    -u, --upstream <upstream>    The url of the upstream pict-rs server [env: PICTRS_PROXY_UPSTREAM=]  [default:
                                 http://localhost:8080]

Examples

Running on all interfaces, port 8081, proxying to localhost:8080

$ ./pict-rs-proxy

Running locally, port 9000, proxying to localhost:4000

$ ./pict-rs-proxy -a 127.0.0.1:9000 -d localhost:4000 -u localhost:4000

Docker production

# Create a folder for the files (anywhere works)
mkdir ./pict-rs-proxy
cd ./pict-rs-proxy
mkdir -p volumes/pictrs
sudo chown -R 991:991 volumes/pictrs
wget https://git.asonix.dog/asonix/pict-rs-proxy/raw/branch/main/docker/prod/docker-compose.yml
sudo docker-compose up -d

Docker development

git clone https://git.asonix.dog/asonix/pict-rs-proxy
cd pict-rs-proxy/docker/dev
docker-compose up --build

Contributing

Feel free to open issues for anything you find an issue with. Please note that any contributed code will be licensed under the AGPLv3.

License

Copyright © 2021 Riley Trautman

pict-rs-proxy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

pict-rs-proxy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This file is part of pict-rs.

You should have received a copy of the GNU General Public License along with pict-rs. If not, see http://www.gnu.org/licenses/.