update for container building
This commit is contained in:
parent
1da3f5a4d3
commit
8d0b67c259
2 changed files with 23 additions and 12 deletions
18
Dockerfile
18
Dockerfile
|
@ -1,14 +1,10 @@
|
|||
# This image used for CI.
|
||||
FROM alpine:3.20
|
||||
|
||||
FROM alpine:3.15
|
||||
MAINTAINER ungleich <foss@ungleich.ch>
|
||||
RUN apk add --no-cache make python3 imagemagick
|
||||
COPY . /build
|
||||
|
||||
RUN pip install lektor
|
||||
RUN mkdir /build /data
|
||||
COPY . /data
|
||||
WORKDIR /build
|
||||
RUN make build
|
||||
|
||||
FROM nginx:
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y make python3-pip imagemagick openssh-client rsync git
|
||||
RUN pip3 install git+https://github.com/lektor/lektor/
|
||||
FROM nginx:alpine
|
||||
COPY --from=0 /ungleich-staticcms-build /usr/share/nginx/html
|
||||
|
|
17
Makefile
17
Makefile
|
@ -1,7 +1,22 @@
|
|||
BUILDDIR?=../ungleich-staticcms-build
|
||||
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/u/
|
||||
|
||||
all: goodpush
|
||||
VERSION=$(shell git describe --always)
|
||||
ARGOCD_HOME=$$HOME/vcs/k8s-config/cluster/p10/apps/templates/
|
||||
ARGOCD_YAML=staticweb-ungleich.yaml
|
||||
ARGOCD_APP=$(ARGOCD_HOME)/$(ARGOCD_YAML)
|
||||
|
||||
IMAGE_NAME=harbor.k8s.ungleich.ch/ungleich-public/ungleich-staticcms
|
||||
|
||||
all: container
|
||||
|
||||
container: push
|
||||
docker build -t $(IMAGE_NAME):$(VERSION) .
|
||||
docker push $(IMAGE_NAME):$(VERSION)
|
||||
|
||||
argocd: container
|
||||
sed -i "s,$(IMAGE_NAME):.*,$(IMAGE_NAME):$(VERSION)," $(ARGOCD_APP)
|
||||
cd $(ARGOCD_HOME) && git add $(ARGOCD_YAML) && git commit -m "Update ungleich-staticcms to $(VERSION)" $(ARGOCD_YAML) && git push
|
||||
|
||||
pull:
|
||||
git pull
|
||||
|
|
Loading…
Reference in a new issue