Compare commits
No commits in common. "master" and "refactoring" have entirely different histories.
master
...
refactorin
1
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
venv/
|
||||
.DS_Store
|
||||
.idea/
|
||||
.history
|
||||
|
|
|
@ -2,7 +2,7 @@ stages:
|
|||
- build
|
||||
- deploy
|
||||
|
||||
image: code.ungleich.ch:5050/ungleich-public/ungleich-staticcms:latest
|
||||
image: registry.gitlab.com/fnux/ungleich-images/staticcms-ci:latest
|
||||
variables:
|
||||
BUILDDIR: "build/"
|
||||
|
||||
|
|
13
Dockerfile
|
@ -1,10 +1,7 @@
|
|||
FROM alpine:3.20
|
||||
# This image used for CI.
|
||||
|
||||
RUN apk add --no-cache make python3 imagemagick
|
||||
COPY . /build
|
||||
FROM debian:latest
|
||||
MAINTAINER Timothée Floure <timothee.floure@ungleich.ch>
|
||||
|
||||
WORKDIR /build
|
||||
RUN make build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=0 /ungleich-staticcms-build /usr/share/nginx/html
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y make lektor imagemagick openssh-client rsync
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
# This image used for CI.
|
||||
|
||||
FROM debian:latest
|
||||
MAINTAINER Timothée Floure <timothee.floure@ungleich.ch>
|
||||
|
||||
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/
|
40
Makefile
|
@ -1,46 +1,11 @@
|
|||
BUILDDIR?=../ungleich-staticcms-build
|
||||
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/u/
|
||||
|
||||
VENV_PATH=../venv
|
||||
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
|
||||
|
||||
# These run outside the container
|
||||
all: argocd
|
||||
|
||||
argocd: container
|
||||
sed -i "s,$(IMAGE_NAME):.*,$(IMAGE_NAME):$(VERSION)," $(ARGOCD_APP)
|
||||
cd $(ARGOCD_HOME) && git pull && git add $(ARGOCD_YAML) && git commit -m "[staticweb] Update ungleich-staticcms to $(VERSION)" $(ARGOCD_YAML) && git push
|
||||
|
||||
container: push
|
||||
docker build -t $(IMAGE_NAME):$(VERSION) .
|
||||
docker push $(IMAGE_NAME):$(VERSION)
|
||||
|
||||
justcontainer:
|
||||
docker build -t $(IMAGE_NAME):$(VERSION) .
|
||||
|
||||
push: pull
|
||||
git push
|
||||
all: publish
|
||||
|
||||
pull:
|
||||
git pull
|
||||
|
||||
run: justcontainer
|
||||
docker run -p 8082:80 $(IMAGE_NAME):$(VERSION)
|
||||
|
||||
# These run inside the container
|
||||
build: venv
|
||||
. $(VENV_PATH)/bin/activate && lektor build -O $(BUILDDIR)
|
||||
|
||||
venv: requirements.txt
|
||||
python3 -m venv $(VENV_PATH)
|
||||
sh -c ". $(VENV_PATH)/bin/activate && pip install -r requirements.txt"
|
||||
|
||||
# Pre container targets (kept for reference)
|
||||
publish: pull build deploy
|
||||
|
||||
deploy: permissions
|
||||
|
@ -51,5 +16,8 @@ permissions: build
|
|||
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
|
||||
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
|
||||
|
||||
build:
|
||||
lektor build -O $(BUILDDIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)
|
||||
|
|
Before ![]() (image error) Size: 17 KiB |
Before ![]() (image error) Size: 258 KiB |
Before ![]() (image error) Size: 22 KiB |
Before ![]() (image error) Size: 48 KiB |
Before ![]() (image error) Size: 30 KiB |
Before ![]() (image error) Size: 44 KiB |
Before ![]() (image error) Size: 44 KiB |
Before ![]() (image error) Size: 38 KiB |
Before ![]() (image error) Size: 42 KiB |
Before ![]() (image error) Size: 50 KiB |
Before ![]() (image error) Size: 38 KiB |
Before ![]() (image error) Size: 50 KiB |
Before ![]() (image error) Size: 49 KiB |
Before ![]() (image error) Size: 36 KiB |
Before ![]() (image error) Size: 63 KiB |
Before ![]() (image error) Size: 44 KiB |
Before ![]() (image error) Size: 58 KiB |
Before ![]() (image error) Size: 58 KiB |
Before ![]() (image error) Size: 52 KiB |
Before ![]() (image error) Size: 36 KiB |
Before ![]() (image error) Size: 30 KiB |
Before ![]() (image error) Size: 34 KiB |
Before ![]() (image error) Size: 41 KiB |
Before ![]() (image error) Size: 29 KiB |
Before ![]() (image error) Size: 42 KiB |
Before ![]() (image error) Size: 41 KiB |
Before ![]() (image error) Size: 14 KiB |
Before ![]() (image error) Size: 109 KiB |
Before ![]() (image error) Size: 291 KiB |
Before ![]() (image error) Size: 139 KiB |
Before ![]() (image error) Size: 78 KiB |
Before ![]() (image error) Size: 65 KiB |
Before ![]() (image error) Size: 135 KiB |
Before ![]() (image error) Size: 144 KiB |
Before ![]() (image error) Size: 81 KiB |
Before ![]() (image error) Size: 232 KiB |
Before ![]() (image error) Size: 237 KiB |
Before ![]() (image error) Size: 302 KiB |
Before ![]() (image error) Size: 98 KiB |
Before ![]() (image error) Size: 62 KiB |
Before ![]() (image error) Size: 115 KiB |
BIN
assets/u/image/cards/hackinghotel.jpg
Normal file
After ![]() (image error) Size: 46 KiB |
Before ![]() (image error) Size: 46 KiB |
Before ![]() (image error) Size: 310 KiB |
Before ![]() (image error) Size: 214 KiB |
Before ![]() (image error) Size: 261 KiB |
Before ![]() (image error) Size: 82 KiB |
Before ![]() (image error) Size: 209 KiB |
Before ![]() (image error) Size: 212 KiB |
Before ![]() (image error) Size: 109 KiB |
Before ![]() (image error) Size: 80 KiB |
Before ![]() (image error) Size: 76 KiB |
Before ![]() (image error) Size: 81 KiB |
Before ![]() (image error) Size: 104 KiB |
Before ![]() (image error) Size: 102 KiB |
Before ![]() (image error) Size: 64 KiB |
Before ![]() (image error) Size: 115 KiB |
Before ![]() (image error) Size: 123 KiB |
Before ![]() (image error) Size: 402 KiB |
Before ![]() (image error) Size: 76 KiB |
Before ![]() (image error) Size: 335 KiB |
Before ![]() (image error) Size: 282 KiB |
Before ![]() (image error) Size: 356 KiB |
Before ![]() (image error) Size: 143 KiB |
Before ![]() (image error) Size: 94 KiB |
Before ![]() (image error) Size: 91 KiB |
Before ![]() (image error) Size: 114 KiB |
Before ![]() (image error) Size: 264 KiB |
Before ![]() (image error) Size: 136 KiB |
Before ![]() (image error) Size: 201 KiB |
Before ![]() (image error) Size: 118 KiB |
Before ![]() (image error) Size: 275 KiB |
Before ![]() (image error) Size: 253 KiB |
Before ![]() (image error) Size: 142 KiB |
Before ![]() (image error) Size: 73 KiB |
Before ![]() (image error) Size: 86 KiB |
Before ![]() (image error) Size: 121 KiB |
Before ![]() (image error) Size: 274 KiB |
Before ![]() (image error) Size: 181 KiB |
Before ![]() (image error) Size: 151 KiB |
Before ![]() (image error) Size: 325 KiB |
Before ![]() (image error) Size: 160 KiB |
Before ![]() (image error) Size: 94 KiB |
Before ![]() (image error) Size: 157 KiB |
Before ![]() (image error) Size: 106 KiB |
Before ![]() (image error) Size: 562 KiB |
Before ![]() (image error) Size: 134 KiB |
Before ![]() (image error) Size: 594 KiB |
Before ![]() (image error) Size: 145 KiB |
Before ![]() (image error) Size: 238 KiB |
Before ![]() (image error) Size: 314 KiB |
Before ![]() (image error) Size: 200 KiB |
Before ![]() (image error) Size: 103 KiB |
Before ![]() (image error) Size: 475 KiB |
Before ![]() (image error) Size: 118 KiB |