Update Docker configuration: change image tags to 'latest' and simplify compose.yaml for site deployment
This commit is contained in:
parent
a44bdd9344
commit
010bcac0d2
9
Makefile
9
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
|
37
compose.yaml
37
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:
|
||||
external: true
|
Loading…
x
Reference in New Issue
Block a user