diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d9b68a9 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,38 @@ +--- +# SPDX-FileCopyrightText: Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: GPL-3.0-or-later + +kind: pipeline +name: default + +steps: + - name: deploy + image: docker:20 + environment: + XDG_RUNTIME_DIR: "/run/user/1001" + DOCKER_HOST: "unix:///run/user/1001/docker.sock" + commands: + - docker compose -p fedigov up --build -d + volumes: + - name: dockersock + path: /run/user/1001/docker.sock + when: + branch: + - main + event: + - push + - tag + - deployment + +node: + cont1: plutex + +volumes: + - name: dockersock + host: + path: /run/user/1001/docker.sock + +--- +kind: signature +hmac: 4340882636d0b9bb9ac974b8db7679b7f155ce98954de11417e64cc96198bf57 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c043ae2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: GPL-3.0-or-later + +version: "3" +services: + publicom: + container_name: fedigov + build: + context: site + image: fedigov + restart: always + # Reverse Proxy + labels: + proxy.host: "fedigov.eu" + proxy.port: "9260" + ports: + - "9260:8043" diff --git a/site/Dockerfile b/site/Dockerfile new file mode 100644 index 0000000..d838893 --- /dev/null +++ b/site/Dockerfile @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# Build site +FROM klakegg/hugo:0.101.0-ext-debian-onbuild AS hugo + +# Serve site +FROM pierrezemb/gostatic +COPY --from=hugo /target/ /srv/http/