mirror of
https://git.verdigado.com/NB-Public/simple-wkd.git
synced 2024-10-30 01:05:53 +01:00
Packaging for debian
This commit is contained in:
parent
39b1e85d3c
commit
dcfde18496
5 changed files with 8 additions and 83 deletions
|
@ -1,11 +0,0 @@
|
|||
*config.toml
|
||||
Dockerfile
|
||||
README.md
|
||||
.github/workflows/*
|
||||
backend/data/*
|
||||
backend/logs/*
|
||||
backend/target/*
|
||||
website/README.md
|
||||
website/dist/*
|
||||
website/node_modules/*
|
||||
website/.vscode/*
|
42
Dockerfile
42
Dockerfile
|
@ -1,42 +0,0 @@
|
|||
ARG base="alpine:3.18"
|
||||
|
||||
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
|
||||
FROM --platform=$BUILDPLATFORM ${base} AS bin-builder
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
COPY --from=xx / /
|
||||
|
||||
# Enable cargo sparse index for faster update times, see: https://blog.rust-lang.org/inside-rust/2023/01/30/cargo-sparse-protocol.html
|
||||
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||
|
||||
RUN apk add clang lld musl-dev cargo
|
||||
COPY backend .
|
||||
RUN xx-cargo build --release --target-dir ./build && \
|
||||
xx-verify ./build/$(xx-cargo --print-target-triple)/release/simple-wkd
|
||||
RUN mv ./build/$(xx-cargo --print-target-triple)/release/simple-wkd simple-wkd-executable
|
||||
|
||||
|
||||
FROM --platform=$BUILDPLATFORM ${base} AS webpage-builder
|
||||
|
||||
RUN apk add npm
|
||||
COPY website .
|
||||
RUN npm install -g pnpm && \
|
||||
pnpm install && \
|
||||
pnpm run build
|
||||
COPY assets assets
|
||||
# Move website in templates folder
|
||||
RUN mv dist assets/webpage
|
||||
|
||||
|
||||
FROM ${base}
|
||||
|
||||
WORKDIR /wkd
|
||||
COPY entrypoint.sh entrypoint.sh
|
||||
COPY --from=webpage-builder assets assets
|
||||
COPY --from=bin-builder simple-wkd-executable wkd
|
||||
RUN apk add --no-cache libgcc && \
|
||||
adduser --no-create-home --disabled-password wkd && \
|
||||
chown -R wkd:wkd /wkd
|
||||
|
||||
ENTRYPOINT [ "sh", "/wkd/entrypoint.sh" ]
|
|
@ -12,17 +12,4 @@ npm install -g pnpm && \
|
|||
pnpm install && \
|
||||
pnpm astro telemetry disable && \
|
||||
pnpm run build
|
||||
#cp -R assets/* assets
|
||||
mv dist assets/webpage
|
||||
|
||||
|
||||
|
||||
#WORKDIR /wkd
|
||||
#COPY entrypoint.sh entrypoint.sh
|
||||
#COPY --from=webpage-builder assets assets
|
||||
#COPY --from=bin-builder simple-wkd-executable wkd
|
||||
#RUN apk add --no-cache libgcc && \
|
||||
# adduser --no-create-home --disabled-password wkd && \
|
||||
# chown -R wkd:wkd /wkd
|
||||
#
|
||||
#ENTRYPOINT [ "sh", "/wkd/entrypoint.sh" ]
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
version: '3'
|
||||
services:
|
||||
keyserver:
|
||||
image: "delta1925/simple-wkd"
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
||||
environment:
|
||||
- RUST_LOG=debug
|
||||
volumes:
|
||||
- ./config.toml:/wkd/config.toml
|
||||
- wkd-data:/wkd/data
|
||||
- wkd-logs:/wkd/logs
|
||||
|
||||
volumes:
|
||||
wkd-data:
|
||||
wkd-logs:
|
8
package-debian.sh
Normal file
8
package-debian.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
mkdir wkd
|
||||
cp entrypoint.sh wkd
|
||||
cp example.config.toml wkd/config.toml
|
||||
cp -R assets wkd/assets
|
||||
cp simple-wkd-executable wkd
|
||||
useradd --no-create-home wkd
|
||||
chown -R wkd:wkd wkd
|
Loading…
Reference in a new issue