chore: refactor

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-03-29 12:04:18 +00:00
parent 1aa2852885
commit 8160c1a7f7
5 changed files with 91 additions and 80 deletions

29
support/Containerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM docker.io/library/rust AS builder
RUN apt-get update && apt-get install -y musl-tools && apt-get clean
RUN rustup target add x86_64-unknown-linux-musl
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo fetch
RUN rm -rf src
COPY src ./src
COPY migrations ./migrations
COPY .sqlx ./.sqlx
RUN cargo build --target=x86_64-unknown-linux-musl --release
FROM docker.io/library/alpine
RUN apk add --no-cache wireguard-tools iptables iproute2
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/veil /usr/local/bin/veil
EXPOSE 51820/udp
EXPOSE 51821/tcp
ENTRYPOINT ["/usr/local/bin/veil"]
CMD ["--help"]