diff --git a/privfrontends/configs/shoelace/shoelace.toml b/privfrontends/configs/shoelace/shoelace.toml new file mode 100644 index 0000000..e686a89 --- /dev/null +++ b/privfrontends/configs/shoelace/shoelace.toml @@ -0,0 +1,51 @@ +[server] +# Address to listen on +listen="0.0.0.0" +# Port to bind +port=8080 +# Instance URL. Needed for accurate proxied media locations in API +base_url="https://lace.projectsegfau.lt" + +[server.tls] +# Enable TLS support +enabled=false +# Path for certificate chain, in PEM format +cert="cert.pem" +# Path for key file, in PEM format +key="key.pem" + +[endpoint] +# Toggle the frontend +frontend=true +# Toggle the API +api=true + +[proxy] +# Proxy backend. Valid options are: +# - none: Disable the media proxy. Not recommended if frontend is enabled +# - internal: Stores values in memory. Destroys itself after stopping Shoelace. +# - redis: Stores values in a Redis server. Higher performance. Requires additional software +backend="internal" + +[proxy.redis] +# URI for Redis server. +# - TCP: redis://[][:@][:port][/] +# - Unix socket: redis+unix:///[?db=[&pass=][&user=]] +uri="redis://127.0.0.1/" + +[logging] +# Sets log level, for both stdout and logfiles. Valid levels are: +# - error: Shows errors presented during runtime +# - warn: Plus Alerts +# - info: Plus useful information, such as PID, requests, etc. (Recommended) +# - debug: Plus verbose actions. Not being used much. +# - trace: Plus low-level, extremely verbose info. Not used much. +level = "info" +# Whether to log the IP of an incoming connection +log_ips = false +# Whether to log what URLs are being assigned to each hash +log_cdn = false +# Store logs in a text file +store = false +# Where to store the logs in that case +output = "shoelace.log" diff --git a/privfrontends/templates/Caddyfile.j2 b/privfrontends/templates/Caddyfile.j2 index c413008..f6cda77 100644 --- a/privfrontends/templates/Caddyfile.j2 +++ b/privfrontends/templates/Caddyfile.j2 @@ -290,3 +290,9 @@ priviblur.{{ server_prefix }}.projectsegfau.lt priviblur.projectsegfau.lt pb.psf reverse_proxy :9084 import torloc priviblur } + +lace.{{ server_prefix }}.projectsegfau.lt lace.projectsegfau.lt l.psf.lt l.{{ server_prefix }}.psf.lt { + import def + reverse_proxy :9029 + import torloc lace +} diff --git a/privfrontends/vars.yaml b/privfrontends/vars.yaml index a748fe9..e7bce3a 100644 --- a/privfrontends/vars.yaml +++ b/privfrontends/vars.yaml @@ -256,6 +256,20 @@ apps: REDIS_REPLICATION_MODE: master mounts: - "{{data_dir}}/priviblur/redis-data:/data" + shoelace: + needs_configs_dir: true + needs_data_dir: true + docker_settings: + services: + - name: shoelace + image: nixgoat/shoelace + ports: + - "9029:8000" + mounts: + - "{{configs_dir}}/shoelace/shoelace.toml:/data/shoelace.toml" + - "{{data_dir}}/shoelace:/data" + environment: + SHOELACE_CONFIG=/data/shoelace.toml watchtower: needs_configs_dir: false needs_data_dir: false