diff --git a/valtrix-web/.gitea/workflows/deploy.yaml b/valtrix-web/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..4ae1fa5 --- /dev/null +++ b/valtrix-web/.gitea/workflows/deploy.yaml @@ -0,0 +1,107 @@ +name: Build and Deploy Container + +on: + push: + branches: + - main + - develop + +env: # global: unkritische, strukturgebende Variablen + TARGET_HOST: host.containers.internal + TARGET_USER: traefik + APP_DIR: /home/traefik/valtrix-web + CONTAINER_NAME: valtrix-web + QUADLET_FILE: ./deploy/valtrix-web.container + +jobs: + build_and_deploy: + runs-on: ubuntu-latest + env: # Job-spezifisch: Secrets und sensible Werte + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }} + + steps: + - name: Pre-clean Git global config (avoid https→ssh rewrite) + shell: bash + run: | + set -euo pipefail + echo "Cleaning up global git config" + git config --global --unset-all core.sshCommand || true + for key in $(git config --global --get-regexp '^url\\..*\\.insteadof$' 2>/dev/null | awk '{print $1}'); do + if echo "$key" | grep -qi 'gitea\\.smb-corp\\.de'; then + git config --global --unset-all "$key" || true + fi + done + + - name: Setup SSH for git/scp + shell: bash + run: | + install -m 700 -d ~/.ssh + printf "%s\n" "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + printf "%s\n" "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts || true + chmod 644 ~/.ssh/known_hosts + # Ensure host keys exist + (ssh-keygen -F "$TARGET_HOST" >/dev/null || ssh-keyscan -H "$TARGET_HOST" >> ~/.ssh/known_hosts) || true + (ssh-keygen -F gitea.smb-corp.de >/dev/null || ssh-keyscan -H gitea.smb-corp.de >> ~/.ssh/known_hosts) || true + + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Copy repository to target host (atomic replace) + shell: bash + run: | + set -euo pipefail + TMP_DIR="$APP_DIR.tmp.$(date +%s)" + ssh -i ~/.ssh/id_ed25519 $TARGET_USER@$TARGET_HOST "mkdir -p '$TMP_DIR'" + scp -r -i ~/.ssh/id_ed25519 ./* $TARGET_USER@$TARGET_HOST:$TMP_DIR/ + ssh -i ~/.ssh/id_ed25519 $TARGET_USER@$TARGET_HOST " + set -euo pipefail; + if [ -d '$APP_DIR' ]; then rm -rf '$APP_DIR'; fi; + mv '$TMP_DIR' '$APP_DIR' + " + + - name: Build container on target host + shell: bash + run: | + ssh -i ~/.ssh/id_ed25519 $TARGET_USER@$TARGET_HOST " + set -euo pipefail + export APP_DIR='$APP_DIR' CONTAINER_NAME='$CONTAINER_NAME' + cd \"\$APP_DIR\" + echo 'Building container: '\$CONTAINER_NAME 'in' \$APP_DIR + podman build -t \$CONTAINER_NAME:latest . + " + + - name: Backup existing Quadlet file + shell: bash + run: | + ssh -i ~/.ssh/id_ed25519 $TARGET_USER@$TARGET_HOST " + set -euo pipefail + export CONTAINER_NAME='$CONTAINER_NAME' + QFILE=~/.config/containers/systemd/\$CONTAINER_NAME.container + test -f \"\$QFILE\" && cp \"\$QFILE\" \"\$QFILE.bak\" || true + " + + - name: Replace Quadlet file and restart service + shell: bash + run: | + scp -i ~/.ssh/id_ed25519 "$QUADLET_FILE" $TARGET_USER@$TARGET_HOST:~/.config/containers/systemd/ + ssh -i ~/.ssh/id_ed25519 $TARGET_USER@$TARGET_HOST " + set -euo pipefail + export CONTAINER_NAME='$CONTAINER_NAME' + systemctl --user daemon-reload + systemctl --user restart \$CONTAINER_NAME.service + echo 'Service restarted: '\$CONTAINER_NAME + " + + - name: Verify deployment + shell: bash + run: | + ssh -i ~/.ssh/id_ed25519 $TARGET_USER@$TARGET_HOST " + set -euo pipefail + export CONTAINER_NAME='$CONTAINER_NAME' + echo 'Running containers:' + podman ps --filter \"name=\$CONTAINER_NAME\" --format \"table {{.Names}}\t{{.Image}}\t{{.Status}}\" + echo '--- Last 20 log lines ---' + podman logs \$CONTAINER_NAME --tail 20 || echo 'No logs available' + " \ No newline at end of file diff --git a/valtrix-web/Caddyfile b/valtrix-web/Caddyfile new file mode 100644 index 0000000..7695958 --- /dev/null +++ b/valtrix-web/Caddyfile @@ -0,0 +1,20 @@ +:80 { + # Set the root directory for the static site + root * /usr/share/caddy + + # Enable file server + file_server + + # Enable compression (gzip/zstd) + encode gzip zstd + + # Security headers (optional but recommended) + header { + # Enable HSTS + Strict-Transport-Security "max-age=31536000;" + # Disable MIME sniffing + X-Content-Type-Options "nosniff" + # XSS protection + X-XSS-Protection "1; mode=block" + } +} diff --git a/valtrix-web/Dockerfile b/valtrix-web/Dockerfile new file mode 100644 index 0000000..4fa2399 --- /dev/null +++ b/valtrix-web/Dockerfile @@ -0,0 +1,34 @@ +# Stage 1: Builder +# We use a lightweight Wolfi image to gather the files. +# In a real build process, this might involve 'npm run build', but for static files, +# we just copy them. Using a stage here allows for future extensibility. +FROM cgr.dev/chainguard/wolfi-base AS builder + +WORKDIR /app + +# Copy all files to the builder stage +COPY . . + +# Stage 2: Final +# Use the official Wolfi base image and install Caddy manually +# since the pre-built Caddy image requires authentication or is restricted. +FROM cgr.dev/chainguard/wolfi-base:latest + +# Install Caddy +RUN apk update && apk add caddy + +# Copy the Caddyfile +COPY Caddyfile /etc/caddy/Caddyfile + +# Copy the static site content from the builder stage +COPY --from=builder /app /usr/share/caddy + +# Expose ports +# 80 for HTTP +# 443 for HTTPS (and HTTP/3 over UDP) +EXPOSE 80 +EXPOSE 443 +EXPOSE 443/udp + +# Run Caddy +CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] diff --git a/valtrix-web/datenschutz-en.html b/valtrix-web/datenschutz-en.html new file mode 100644 index 0000000..05bb9fa --- /dev/null +++ b/valtrix-web/datenschutz-en.html @@ -0,0 +1,96 @@ + + + +
+ + +The following notes provide a simple overview of what happens to your personal data when you visit this + website. Personal data is all data with which you can be personally identified.
+ +We host the content of our website with the following provider:
+This website is hosted externally. The personal data collected on this website is stored on the hoster's + servers. This may include IP addresses, contact requests, meta and communication data, contract data, + contact details, names, website access, and other data generated via a website.
+ +The operators of these pages take the protection of your personal data very seriously. We treat your + personal data confidentially and in accordance with the statutory data protection regulations and this + privacy policy.
+ +The responsible body for data processing on this website is:
+Valtrix GmbH
+ Musterstraße 123
+ 10115 Berlin
Email: info@valtrix.systems
+ +Our website does not use cookies.
+ +The provider of the pages automatically collects and stores information in so-called server log files, + which your browser automatically transmits to us. These are:
+This data is not merged with other data sources.
+ +If you contact us by email, your inquiry including all resulting personal data (name, inquiry) will be + stored and processed by us for the purpose of processing your request. We do not pass on this data + without your consent.
+Die folgenden Hinweise geben einen einfachen Überblick darüber, was mit Ihren personenbezogenen Daten + passiert, wenn Sie diese Website besuchen. Personenbezogene Daten sind alle Daten, mit denen Sie + persönlich identifiziert werden können.
+ +Wer ist verantwortlich für die Datenerfassung auf dieser Website?
+Die Datenverarbeitung auf dieser Website erfolgt durch den Websitebetreiber. Dessen Kontaktdaten können + Sie dem Impressum dieser Website entnehmen.
+ +Wie erfassen wir Ihre Daten?
+Ihre Daten werden zum einen dadurch erhoben, dass Sie uns diese mitteilen. Hierbei kann es sich z. B. um + Daten handeln, die Sie in ein Kontaktformular eingeben oder per E-Mail senden.
+Andere Daten werden automatisch oder nach Ihrer Einwilligung beim Besuch der Website durch unsere + IT-Systeme erfasst. Das sind vor allem technische Daten (z. B. Internetbrowser, Betriebssystem oder + Uhrzeit des Seitenaufrufs). Die Erfassung dieser Daten erfolgt automatisch, sobald Sie diese Website + betreten.
+ +Wir hosten die Inhalte unserer Website bei einem externen Anbieter (Host). Die personenbezogenen Daten, + die auf dieser Website erfasst werden, werden auf den Servern des Hosts gespeichert. Hierbei kann es + sich v. a. um IP-Adressen, Kontaktanfragen, Meta- und Kommunikationsdaten, Vertragsdaten, Kontaktdaten, + Namen, Websitezugriffe und sonstige Daten, die über eine Website generiert werden, handeln.
+ +Die Betreiber dieser Seiten nehmen den Schutz Ihrer persönlichen Daten sehr ernst. Wir behandeln Ihre + personenbezogenen Daten vertraulich und entsprechend den gesetzlichen Datenschutzvorschriften sowie + dieser Datenschutzerklärung.
+ +Die verantwortliche Stelle für die Datenverarbeitung auf dieser Website ist:
+Valtrix GmbH
+ Musterstraße 123
+ 10115 Berlin
E-Mail: info@valtrix.systems
+ +Unsere Website verwendet keine Cookies.
+ +Der Provider der Seiten erhebt und speichert automatisch Informationen in so genannten + Server-Log-Dateien, die Ihr Browser automatisch an uns übermittelt. Dies sind:
+Eine Zusammenführung dieser Daten mit anderen Datenquellen wird nicht vorgenommen.
+ +Wenn Sie uns per E-Mail kontaktieren, wird Ihre Anfrage inklusive aller daraus hervorgehenden + personenbezogenen Daten (Name, Anfrage) zum Zwecke der Bearbeitung Ihres Anliegens bei uns gespeichert + und verarbeitet. Diese Daten geben wir nicht ohne Ihre Einwilligung weiter.
+Valtrix GmbH
+ Musterstraße 123
+ 10115 Berlin
Max Mustermann
+ +Phone: +49 (0) 123 456789
+ Email: info@valtrix.systems
Entry in the Commercial Register.
+ Register Court: District Court Berlin-Charlottenburg
+ Register Number: HRB 123456
Sales tax identification number according to § 27 a Sales Tax Law:
+ DE123456789
Valtrix GmbH
+ Musterstraße 123
+ 10115 Berlin
Telefon: +49 (0) 123 456789
+ E-Mail: info@valtrix.systems
Eintragung im Handelsregister.
+ Registergericht: Amtsgericht Berlin-Charlottenburg
+ Registernummer: HRB 123456
Umsatzsteuer-Identifikationsnummer gemäß § 27 a Umsatzsteuergesetz:
+ DE123456789
We combine Security, AI, and Cloud into robust solutions for your business.
+Valtrix stands for technological excellence. In an increasingly complex digital world, we provide + the protection and infrastructure you need to grow.
+Our team of experts combines deep cybersecurity knowledge with state-of-the-art AI approaches and + scalable cloud architectures.
+Proactive protection for your data and infrastructure. Penetration Testing, Audits, and + Secure-by-Design Architecture.
+Tailored AI models and automation solutions that make your processes more efficient.
+Scalable and secure cloud migrations, management, and optimization for AWS, Azure, and Google + Cloud.
+Ready for the next step? Send us an email or give us a call.
+ info@valtrix.systems +Musterstraße 123
10115 Berlin
Germany
Wir verbinden Security, AI und Cloud zu robusten Lösungen für Ihr Unternehmen.
+ +Valtrix steht für technologische Exzellenz. In einer immer komplexer werdenden digitalen Welt + bieten wir Ihnen den Schutz und die Infrastruktur, die Sie benötigen, um zu wachsen.
+Unser Team aus Experten vereint tiefgehendes Wissen in Cybersecurity mit modernsten KI-Ansätzen + und skalierbaren Cloud-Architekturen.
+Proaktiver Schutz für Ihre Daten und Infrastruktur. Penetration Testing, Audits und + Secure-by-Design Architektur.
+Maßgeschneiderte KI-Modelle und Automatisierungslösungen, die Ihre Prozesse effizienter machen. +
+Skalierbare und sichere Cloud-Migrationen, Management und Optimierung für AWS, Azure und Google + Cloud.
+Bereit für den nächsten Schritt? Schreiben Sie uns eine E-Mail oder rufen Sie an.
+ info@valtrix.systems +Musterstraße 123
10115 Berlin
Deutschland