diff --git a/kontor-angular/Containerfile b/kontor-angular/Containerfile index 770d77a..1a11fe7 100644 --- a/kontor-angular/Containerfile +++ b/kontor-angular/Containerfile @@ -1,5 +1,5 @@ ### STAGE 1: Build ### -FROM node:22.15-alpine AS build +FROM docker.io/node:22-alpine AS build WORKDIR /app COPY package.json package-lock.json ./ RUN npm install @@ -7,8 +7,9 @@ COPY . . RUN npm run build ### STAGE 2: Run ### -FROM nginx:1.17.1-alpine +FROM docker.io/library/nginx:stable-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist/kontor-angular/browser /usr/share/nginx/html EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/kontor-angular/nginx.conf b/kontor-angular/nginx.conf index c8444ce..c9f210c 100644 --- a/kontor-angular/nginx.conf +++ b/kontor-angular/nginx.conf @@ -1,4 +1,5 @@ server { + listen 8800; # Root-Verzeichnis für den Server setzen (wir kopieren unsere Anwendung hierher) root /usr/share/nginx/html; diff --git a/script/cibuild b/script/cibuild index d9346c3..d896271 100755 --- a/script/cibuild +++ b/script/cibuild @@ -20,4 +20,6 @@ echo " => Baue Image localhost/kontor-javalin:0.3.0" buildah build -t kontor-javalin:0.3.0 kontor-javalin echo " => Baue Image localhost/kontor-vue:0.3.0" buildah build -t kontor-vue:0.3.0 kontor-vue +echo " => Baue Image localhost/kontor-angular:0.3.0" +buildah build -t kontor-angular:0.3.0 kontor-angular diff --git a/script/setup b/script/setup index 68f0e68..a140350 100755 --- a/script/setup +++ b/script/setup @@ -8,7 +8,7 @@ cd "$(dirname "$0")/.." script/bootstrap -script/cibuild +#script/cibuild echo "==> Setting up pod kontor" @@ -30,6 +30,7 @@ else -p 8500:8500 \ -p 8600:8600 \ -p 8700:80 \ + -p 8800:8800 \ -p 8900:8080 \ -p 61616:61616 \ -p 8161:8161 \ @@ -235,3 +236,21 @@ else localhost/kontor-vue:0.3.0 fi +echo "==> Setting up container kontor-angular" +if podman image exists localhost/kontor-angular:0.3.0; then + echo " => Image localhost/kontor-angular:0.3.0 available" +fi +if podman container exists kontor-angular; then + if podman ps -q --filter "name=kontor-angular"; then + echo " => kontor-angular is running" + fi +else + podman run -d \ + --replace \ + --pod kontor \ + --name kontor-angular \ + --label "io.containers.autoupdate=local" \ + --label "PODMAN_SYSTEMD_UNIT=container-kontor-angular.service" \ + localhost/kontor-angular:0.3.0 +fi + diff --git a/script/update b/script/update index 9e1e3e6..756b29f 100755 --- a/script/update +++ b/script/update @@ -12,4 +12,7 @@ if podman pod exists kontor; then podman pod rm kontor fi +script/cibuild + script/setup +