From 4c3a0c648eeb707299c3d4b12a553c9559c4bd25 Mon Sep 17 00:00:00 2001 From: Melora Hugues Date: Thu, 19 Oct 2023 18:33:46 +0200 Subject: [PATCH] Fix dockerfile and add compose --- Dockerfile | 3 +++ docker-compose.yml | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 24f10c1..58c51c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,9 @@ RUN CGO_ENABLED=0 make build FROM --platform=$TARGETPLATFORM alpine:latest WORKDIR /root COPY --from=builder go/src/git.faercol.me/polyculeconnect/build/polyculeconnect ./ +ADD polyculeconnect/robots.txt /root/ +ADD polyculeconnect/static /root/static/ +ADD polyculeconnect/templates /root/templates/ VOLUME [ "/config" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a5c0292 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3" + +services: + polyculeconnect: + image: git.faercol.me/polyculeconnect/polyculeconnect:latest + container_name: polyculeconnect + volumes: + - "/data/polyculeconnect/config:/config" + restart: unless-stopped + networks: + - web + labels: + - "traefik.http.routers.polyculeconnect.rule=Host(`polyculeconnect.faercol.me`)" + - "traefik.http.routers.polyculeconnect.entrypoints=websecure" + - "traefik.http.routers.polyculeconnect.tls.certresolver=myResolver" + - "traefik.http.services.polyculeconnect.loadbalancer.server.port=5000" + - "traefik.enable=true" + +networks: + web: + external: + true \ No newline at end of file