mirror of
https://github.com/snoyberg/keter.git
synced 2024-11-27 10:12:01 +03:00
66df605437
author Marcin Tolysz <tolysz@gmail.com> 1514741013 +0000 committer Akos Marton <makos999@protonmail.ch> 1582496404 +0100 Squashed rebase from Marcin Tolysz, tolysz/modernize. * Builds with `process` 1.6 * add dependency for `tls-session-manager` * bump resolver Add per bundle certificates for static files and redirects. update sample configuration add reverse proxy * Builds with `process` 1.6 * add dependency for `tls-session-manager` * bump resolver fix reverse proxy for non http1.1 connections Make it compile against more resolvers: resolver: lts-13.8 resolver: lts-12.8 resolver: lts-11.8 resolver: lts-10.8 Delete stack.yaml Update .gitignore Update README.md Update README.md clean Update setup-keter.sh Update PortPool.hs Update PortPool.hs Update PortPool.hs Update PortPool.hs Update App.hs Update App.hs Update App.hs Update App.hs Update App.hs Update App.hs Update App.hs Update App.hs Update App.hs Update LabelMapSpec.hs Update LabelMapSpec.hs Update keter.cabal Update keter.cabal
55 lines
1.3 KiB
Bash
Executable File
55 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
mkdir -p /opt/keter/bin
|
|
cp ~/.local/bin/keter /opt/keter/bin
|
|
|
|
mkdir -p /opt/keter/etc
|
|
cat > /tmp/keter-config.yaml <<EOF
|
|
# Directory containing incoming folder, where to store logs, etc. Relative to
|
|
# the config file directory.
|
|
root: ..
|
|
|
|
# Keter can listen on multiple ports for incoming connections. These ports can
|
|
# have HTTPS either enabled or disabled.
|
|
listeners:
|
|
# HTTP
|
|
- host: "!6" # Listen on all IPv4 hosts
|
|
port: 80 # Could be used to modify port
|
|
# HTTPS
|
|
- host: "!6"
|
|
port: 443
|
|
key: key.pem
|
|
certificate: certificate.pem
|
|
|
|
# User to run applications as
|
|
|
|
# setuid: ubuntu
|
|
|
|
# Get the user's IP address from x-forwarded-for. Useful when sitting behind a
|
|
# load balancer like Amazon ELB.
|
|
|
|
# ip-from-header: true
|
|
EOF
|
|
chown root:root /tmp/keter-config.yaml
|
|
mv /tmp/keter-config.yaml /opt/keter/etc
|
|
|
|
cat > /tmp/keter.service <<EOF
|
|
[Unit]
|
|
Description=Keter Web Server
|
|
Documentation=man:keter(1p) http://github.com/snoyberg/keter
|
|
After=network.service
|
|
|
|
[Service]
|
|
ExecStart=/opt/keter/bin/keter /opt/keter/etc/keter-config.yaml
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
chown root:root /tmp/keter.service
|
|
mv /tmp/keter.service /etc/systemd/system/
|
|
|
|
systemctl enable keter
|
|
systemctl start keter
|
|
|
|
mkdir -p /opt/keter/incoming
|
|
chown "$(whoami)" /opt/keter/incoming
|