diff --git a/Makefile b/Makefile index 56a853c..e035ad7 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,19 @@ dev: build: docker build \ -t $(IMAGE):$(TIMESTAMP) \ - -t $(IMAGE):last \ + -t $(IMAGE):latest \ --build-arg HUGO_BASEURL=https://wiki.cafe \ . push: docker push $(IMAGE):$(TIMESTAMP) - docker push $(IMAGE):last + docker push $(IMAGE):latest release: build push @echo "Release created with timestamp: $(TIMESTAMP)" @echo "Push to Gitea registry: make login tag-registry push-registry" + +# Deploy + +deploy: + docker stack deploy wiki-cafe-site --detach=true -c compose.yaml \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 1bfac1d..bbb760a 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,33 +1,7 @@ services: - hugo: - image: hugomods/hugo:base-non-root-0.145.0 - volumes: - - project:/src/site - - content:/src/site/content - - public:/src/site/public - networks: - - proxy - command: 'hugo server -D -M -s site --bind="0.0.0.0" -b="https://draft.wiki.cafe" --appendPort=false' - # command: 'tail -f /dev/null' - deploy: - update_config: - failure_action: rollback - order: start-first - labels: - - "traefik.enable=true" - - "traefik.http.services.apex_site.loadbalancer.server.port=1313" - - "traefik.http.routers.apex_site.rule=Host(`draft.wiki.cafe`)" - - "traefik.http.routers.apex_site.entrypoints=web-secure" - - "traefik.http.routers.apex_site.tls.certresolver=production" - - "caddy=https://draft.wiki.cafe" - - "caddy.reverse_proxy={{upstreams 1313}}" - - "caddy.tls.on_demand=" - - web-server: - image: nginx:1.23-alpine - volumes: - - public:/usr/share/nginx/html:ro + site: + image: git.coopcloud.tech/wiki-cafe/wiki-cafe-site:latest networks: - proxy healthcheck: @@ -52,9 +26,4 @@ services: networks: proxy: - external: true - -volumes: - project: - content: - public: \ No newline at end of file + external: true \ No newline at end of file