From baf9d87556f6a96ceef4166c80902424d8338c05 Mon Sep 17 00:00:00 2001 From: m0veax Date: Sat, 29 Jun 2024 00:14:38 +0200 Subject: [PATCH] build docker container with git clone to enable automation --- Dockerfile | 4 +++- docker-compose.yaml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile index ae1b8d3..0235bf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM rust:1.75.0 as builder WORKDIR /usr/src/chaospott-status -COPY . . +# git clone anstatt copy, damit Dockerfile in extra repository liegen kann. Danke @a3x +# git ist im image enthalten, da rust image hiervon abstammt https://hub.docker.com/layers/library/buildpack-deps/bookworm-scm/images/sha256-25f20fd3e3c8be1e9626c246986beb400ccfe19b0ab13d57127399927801d499?context=explore +RUN git clone https://git.chaospott.de/Chaospott/chaospott-status.git . # use musl to create a truly static binary https://bxbrenden.github.io/ RUN rustup component add rust-std-x86_64-unknown-linux-musl diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..ef25390 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,18 @@ +version: '3' +services: + spaceapi-v2: + build: . + container_name: spaceapi-v2 + restart: always + labels: + - traefik.frontend.rule=Host:status-v2.chaospott.de + - traefik.port=3000 + - traefik.frontend.passHostHeader=true + - traefik.enable=true + networks: + - extern + +networks: + extern: + external: + name: web