Skip to content

Latest commit

 

History

History
96 lines (73 loc) · 1.6 KB

README.md

File metadata and controls

96 lines (73 loc) · 1.6 KB

Operations

Table of Contents

Prerequisites

apt install certbot docker-compose git nginx python3-certbot-nginx ufw
cd /opt
git clone https://github.com/ursais/frepple-template frepple-template

UFW

ufw allow ssh
ufw allow http
ufw allow https
ufw enable

Nginx

  • Create /etc/nginx/sites-available/frepple.example.com with:
upstream frepple {
    server 127.0.0.1:8080;
}

server {
    listen 80;
    server_name frepple.example.com;

    location / {
        proxy_pass  http://frepple;
    }
}
  • Enable, configure and start Nginx
cd /etc/nginx/sites-enabled
ln -s ../sites-available/frepple.example.com .
nginx -t
certbot

Systemd

Create /etc/systemd/system/frepple.service with:

[Unit]
Description=FrePPLe container starter
After=docker.service network-online.target
Requires=docker.service network-online.target

[Service]
WorkingDirectory=/opt/frepple
Type=oneshot
RemainAfterExit=yes

ExecStartPre=-/usr/local/bin/docker-compose pull --quiet
ExecStart=/usr/local/bin/docker-compose -f docker-compose.yml up -d

ExecStop=/usr/local/bin/docker-compose -f docker-compose.yml down

ExecReload=/usr/local/bin/docker-compose pull --quiet
ExecReload=/usr/local/bin/docker-compose -f docker-compose.yml up -d

[Install]
WantedBy=multi-user.target

and run:

systemctl daemon-reload
systemctl enable frepple
service frepple start

Release

Run:

cd /opt/frepple
git pull
service frepple restart