Added services, updated build script

This commit is contained in:
Maurice 2022-11-03 14:50:07 +01:00
parent 2e2e1b018e
commit 6823c84e5f
4 changed files with 23 additions and 3 deletions

@ -1,5 +1,6 @@
FROM alpine:edge
WORKDIR /app
VOLUME [ "/data" ]
COPY ./target/x86_64-unknown-linux-musl/release/ /app
COPY ./about.html /app/about.html

@ -1,5 +1,7 @@
#!/bin/sh
RUNNER="podman"
cargo build --target x86_64-unknown-linux-musl --release
$RUNNER build -t pastabble:latest .
podman build -t pastabble:latest .
podman save --format oci-archive -o pastabble.tar pastabble
# load with podman load -i pastabble.tar
# run with podman run -p 8080:8080 --name pastabble-c -v pastabble-v:/data -it pastabble

6
nginx-conf.txt Normal file

@ -0,0 +1,6 @@
server {
server_name paste.plabble.org;
location / {
proxy_pass http://127.0.0.1:8080;
}
}

11
pastabble-openrc.sh Normal file

@ -0,0 +1,11 @@
#!/sbin/openrc-run
# Copyright 2022 Plabble
start() {
podman rm pastabble-c || true
podman run --name pastabble-c -p 8080:8080 -v pastabble-v:/data -dt pastabble
}
stop() {
podman stop pastabble-c
}