diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..110d593 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,15 @@ +name: Deploy Docs + +on: + push: + branches: + - main + +jobs: + build: + runs-on: cloud + steps: + - uses: actions/checkout@v4 + + - name: Run Foxogram frontend + run: docker compose up -d --build diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b7c583f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM busybox:stable + +COPY index.html /var/www/html/index.html + +# Write httpd configuration. +RUN <> /var/www/httpd.conf +H:/var/www/html +I:index.html +E404:index.html +EOF + +ENTRYPOINT [ "/bin/httpd" ] +CMD [ "-f", "-p80", "-c/var/www/httpd.conf" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e9522c3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +services: + foxogram-docs: + build: + context: . + restart: always + networks: + - traefik + labels: + traefik.enable: true + traefik.http.routers.foxogram-docs.rule: Host(`docs.foxogram.su`) + traefik.http.routers.foxogram-docs.tls.certresolver: letsencrypt + traefik.http.services.foxogram-docs.loadbalancer.server.port: 80 + +networks: + traefik: + external: true