refactoring
This commit is contained in:
@@ -81,6 +81,10 @@ LABEL service="desktop-app" \
|
||||
environment="production" \
|
||||
description="Meldestelle Compose Desktop Application with VNC"
|
||||
|
||||
# Set non-interactive mode and timezone for package installations
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openjdk-21-jre-headless \
|
||||
@@ -92,15 +96,16 @@ RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
wget \
|
||||
supervisor \
|
||||
tigervnc-common \
|
||||
tigervnc-standalone-server \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create application user
|
||||
RUN useradd -m -s /bin/bash appuser && \
|
||||
mkdir -p /home/appuser/.vnc
|
||||
|
||||
# Set up VNC
|
||||
RUN mkdir -p /home/appuser/.vnc && \
|
||||
echo "meldestelle" | vncpasswd -f > /home/appuser/.vnc/passwd && \
|
||||
# Set up VNC password using a separate RUN command
|
||||
RUN echo "meldestelle" | vncpasswd -f > /home/appuser/.vnc/passwd && \
|
||||
chmod 600 /home/appuser/.vnc/passwd && \
|
||||
chown -R appuser:appuser /home/appuser/.vnc
|
||||
|
||||
@@ -125,7 +130,7 @@ RUN echo '#!/bin/bash' > /opt/start-vnc.sh && \
|
||||
echo 'sleep 2' >> /opt/start-vnc.sh && \
|
||||
echo '' >> /opt/start-vnc.sh && \
|
||||
echo '# Start VNC server' >> /opt/start-vnc.sh && \
|
||||
echo 'x11vnc -display :99 -nopw -listen localhost -xkb -ncache 10 -ncache_cr -rfbport $VNC_PORT &' >> /opt/start-vnc.sh && \
|
||||
echo 'x11vnc -display :99 -rfbauth /home/appuser/.vnc/passwd -listen localhost -xkb -ncache 10 -ncache_cr -rfbport $VNC_PORT &' >> /opt/start-vnc.sh && \
|
||||
echo 'sleep 2' >> /opt/start-vnc.sh && \
|
||||
echo '' >> /opt/start-vnc.sh && \
|
||||
echo '# Start noVNC' >> /opt/start-vnc.sh && \
|
||||
|
||||
@@ -58,19 +58,19 @@ ENV GRADLE_OPTS="-Dorg.gradle.caching=true \
|
||||
ENV GRADLE_USER_HOME=/home/gradle/.gradle
|
||||
|
||||
# Install Node.js for Kotlin/Wasm npm operations
|
||||
ARG NODE_VERSION
|
||||
RUN apk add --no-cache \
|
||||
nodejs \
|
||||
npm \
|
||||
curl && \
|
||||
# Verify installation \
|
||||
node --version && \
|
||||
npm --version && \
|
||||
# Create Gradle Node.js directory structure and symlinks \
|
||||
mkdir -p /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin && \
|
||||
ln -sf /usr/bin/node /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/node && \
|
||||
ln -sf /usr/bin/npm /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/npm && \
|
||||
chown -R gradle:gradle /home/gradle/.gradle
|
||||
#ARG NODE_VERSION
|
||||
#RUN apk add --no-cache \
|
||||
# nodejs \
|
||||
# npm \
|
||||
# curl && \
|
||||
# # Verify installation \
|
||||
# node --version && \
|
||||
# npm --version && \
|
||||
# # Create Gradle Node.js directory structure and symlinks \
|
||||
# mkdir -p /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin && \
|
||||
# ln -sf /usr/bin/node /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/node && \
|
||||
# ln -sf /usr/bin/npm /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/npm && \
|
||||
# chown -R gradle:gradle /home/gradle/.gradle
|
||||
|
||||
# Copy Gradle files first for better layer caching
|
||||
COPY gradle/ gradle/
|
||||
|
||||
@@ -84,7 +84,7 @@ http {
|
||||
|
||||
# API proxy (if needed for backend communication)
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:8081/;
|
||||
proxy_pass http://api-gateway:8081/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
Reference in New Issue
Block a user