diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 39a501a..0000000 --- a/.dockerignore +++ /dev/null @@ -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/* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index cee91db..0000000 --- a/Dockerfile +++ /dev/null @@ -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" ] \ No newline at end of file diff --git a/build-debian.sh b/build-debian.sh index 9d0b4f9..cd8137b 100755 --- a/build-debian.sh +++ b/build-debian.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" ] diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 6f2789a..0000000 --- a/docker-compose.yml +++ /dev/null @@ -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: \ No newline at end of file diff --git a/package-debian.sh b/package-debian.sh new file mode 100644 index 0000000..7f1def4 --- /dev/null +++ b/package-debian.sh @@ -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