commit 1889fb657d333c277d5b8cab384c8fac2a4296d8 Author: Anry Das Date: Sun Feb 23 11:02:56 2025 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a78bd5e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM sapmachine:lts-jre-alpine +MAINTAINER -=:dAs:=- + +RUN apk add --no-cache --upgrade bash +RUN mkdir /app +# If applications are need to be accomadated in the container directly - uncomment next 3 rows +#ADD ./data/app/launch.sh /app +#RUN chmod +x /app/launch.sh +#ADD ./apps/ /app +# otherwice applications are will be in mounted directory ./data/app:/app +WORKDIR /app +CMD [ "./launch.sh" ] diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/apps/.gitkeep b/apps/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/app/.gitkeep b/data/app/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/app/launch.sh b/data/app/launch.sh new file mode 100755 index 0000000..cae3481 --- /dev/null +++ b/data/app/launch.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +readarray -d '' START_FILES < <(find /app -name 'start.sh' -type f -print0) +#echo "[DEBUG] Files: ${START_FILES[*]}" + +if [ ${#START_FILES[@]} -eq 0 ]; then + echo "[ERROR] Files not found" + exit 127 +fi + +for file in "${START_FILES[@]}"; do + if [ "$file" != "" ]; then + echo "[INFO] Launching ${file}" + bash "$file" & + else + echo "[ERROR] Files not found" + fi +done + +while true; do + sleep 10 +done \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..58d9cae --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +services: + java_applications: + build: . + container_name: "JavaApplications" + restart: "unless-stopped" + user: "1000" + ports: + - "53748:53748" + - "26937:26937" + volumes: + - ./data/app:/app