[skip-ci] Update docker file

merge-requests/1/merge
erik 2 years ago
parent 1be50f6680
commit 4a21794c04

@ -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?

@ -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
}

@ -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;

@ -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})

@ -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)

Loading…
Cancel
Save