Direkt zum Hauptinhalt

Installation

Main Server

You can either build the application from source or use a prebuilt binary (only linux x64).

Build from Source

At least version 1.85 of cargo is required. Try using rustup instead of your distributions packages if you're running into issues.

  1. You will need to have rustc, openssl, pkg-config, cargo and npm installed & in your path
  2. Clone the repository: git clone https://github.com/Verfassungsblog/PublishGoods .
  3. Install handlebars & the typescript compiler:requirements: npm install -g handlebars typescripttypescript@5.9.3 webpack webpack-cli
  4. cd into typescript & run: cd typescript && npm install
  5. Build with cargo: cd ../ && cargo build --release
  6. Run with cargo run or with target/release/VerfassungsbooksPublishGoods

Use a prebuilt binary

  1. Download the latest release from GitHub
  2. extract the archive: tar -xf verfassungsbooks-bundled.tar.gz
  3. Run with ./VerfassungsbooksPublishGoods (or create a systemd service)

Adjust Configuration

<TODO>

Example Systemd Service File

To register the server as a systemd service with autostart and running in the background you may use this service file (save as /etc/systemd/system/verfassungsbooks-server.service)

[Unit]
Description=Verfassungsbooks Server
After=network.target

[Service]
WorkingDirectory=/home/verfassungsbooks/verfassungsbooks-server
ExecStart=/home/verfassungsbooks/verfassungsbooks-server/Verfassungsbooks
Restart=always
User=verfassungsbooks

[Install]
WantedBy=multi-user.target

You will need to create a user verfassungsbooks (or change the username in the service file) and change the WorkingDirectory to the directory your installation files lye in. Then adjust the ExecStart so it points to the executable (Verfassungsbooks or target/release/Verfassungsbooks). 

Make sure that the user running the server has write permissions in the data directory!

Now you can start the server with systemctl start verfassungsbooks-server. Logs are redirected to your journal (use journalctl -xe).

Rendering Server

Requirements

For weasyprint you will need to install these requirements:

Ubuntu:

apt install python3-pip libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 libharfbuzz-subset0