forked from Maurice/pastabble
Added services, updated build script
This commit is contained in:
parent
2e2e1b018e
commit
6823c84e5f
@ -1,5 +1,6 @@
|
|||||||
FROM alpine:edge
|
FROM alpine:edge
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
VOLUME [ "/data" ]
|
||||||
|
|
||||||
COPY ./target/x86_64-unknown-linux-musl/release/ /app
|
COPY ./target/x86_64-unknown-linux-musl/release/ /app
|
||||||
COPY ./about.html /app/about.html
|
COPY ./about.html /app/about.html
|
||||||
|
8
build.sh
8
build.sh
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
RUNNER="podman"
|
|
||||||
|
|
||||||
cargo build --target x86_64-unknown-linux-musl --release
|
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
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
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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user