[skip-ci] Update docker file

This commit is contained in:
erik 2022-09-27 17:06:21 +02:00
parent 1be50f6680
commit 4a21794c04
5 changed files with 25 additions and 9 deletions

View file

@ -1,4 +1,4 @@
FROM clojure:temurin-18-jammy
FROM clojure:lein
# Prepare Entrypoint Script
ADD resources /tmp
@ -7,4 +7,6 @@ ENV BUILDDIR="website"
ENV WEBSITEROOT="/var/www/html/website/"
RUN /tmp/install.sh
RUN /tmp/entrypoint.sh
#RUN /tmp/entrypoint.sh
# ToDo: lein not working on clojure image?

View file

@ -13,5 +13,5 @@ function build-and-extract-website() {
# set variables from environment
# read write zugriff sicherstellen
function move-website-files-to-target() {
rsync -ru --exclude-from "/home/$USER/exclude.pattern" --delete WEB-INF/classes/public/* $TARGETDIR
rsync -ru --exclude-from "/etc/exclude.pattern" --delete WEB-INF/classes/public/* $TARGETDIR
}

View file

@ -2,8 +2,13 @@
apt update > /dev/null;
apt install -y unzip rsync
mkdir /etc/lein/
install -m 0700 /tmp/entrypoint.sh /
install -m 0700 /tmp/functions.sh /usr/local/bin/
install -m 0700 /tmp/exclude.pattern /home/$USER
install -m 0700 /tmp/project.clj /home/$USER/.lein/
(cd /home/$USER/.lein; lein deps)
install -m 0700 /tmp/exclude.pattern /etc/
install -m 0700 /tmp/project.clj /etc/lein/
cd /etc/lein;
lein deps;

View file

@ -1,2 +1,11 @@
{:user
{:plugins [[lein-ring "0.12.5"]]}}
(defproject org.domaindrivenarchitecture/c4k-website-build "0.1.1-SNAPSHOT"
:description "website c4k-build package"
:url "https://domaindrivenarchitecture.org"
:license {:name "Apache License, Version 2.0"
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[dda/cryogen-bootstrap "0.1.5"]]
:plugins [[lein-ring "0.12.5"]]
:main cryogen.core
:ring {:init cryogen.server/init
:handler cryogen.server/handler})

View file

@ -57,7 +57,7 @@
{:issuer issuer})
)))
(defn validate-all! []
(defn validate-all! [] ; ToDo: Add all necessary inputs and auth
(br/validate! "fqdn" ::website/fqdn)
(br/validate! "issuer" ::website/issuer :optional true)
(br/validate! "volume-total-storage-size" ::website/volume-total-storage-size :deserializer js/parseInt)