No description
Find a file
2026-05-25 11:23:57 +02:00
docker initial commit 2026-05-23 12:33:21 +02:00
src feature: icon for webapp 2026-05-25 11:23:57 +02:00
.dockerignore initial commit 2026-05-23 12:33:21 +02:00
.gitignore initial commit 2026-05-23 12:33:21 +02:00
compose.yaml refacor: docker compose 2026-05-23 12:49:26 +02:00
Dockerfile initial commit 2026-05-23 12:33:21 +02:00
package-lock.json initial commit 2026-05-23 12:33:21 +02:00
package.json feature: icon for webapp 2026-05-25 11:23:57 +02:00
README.md refacor: docker compose 2026-05-23 12:49:26 +02:00

Hayanisator

Statische Seite fuer Armenisch <-> Latein Transliteration.

Warum dieses Setup?

  • Keine externen CDN-Referenzen mehr.
  • Bootstrap wird lokal via npm installiert.
  • Docker-Image enthaelt nur statische Dateien + nginx.
  • Reproduzierbar durch package-lock.json.

Projektstruktur

  • src/hyanisator.html - Quell-HTML
  • dist/ - Build-Ausgabe (wird lokal erzeugt)
  • docker/nginx.conf - Nginx-Konfiguration fuer den Container
  • Dockerfile - Multi-Stage-Build (Node -> Nginx)

Lokale Entwicklung

  1. Abhaengigkeiten installieren:
npm install
  1. Build ausfuehren:
npm run build
  1. Optional lokal ausliefern:
npm start

Danach ist die Seite unter http://localhost:3000 erreichbar.

Docker Build und Run

Image bauen:

docker build -t hayanisator:latest .

Container starten:

docker run --rm -p 8080:80 hayanisator:latest

Dann ist die App unter http://localhost:8080 erreichbar.

Docker Compose

Start (inkl. Build):

docker compose up -d --build

Logs anzeigen:

docker compose logs -f

Stoppen:

docker compose down

Wichtig: Ja, das npm-Zeug laeuft dabei automatisch innerhalb des Docker-Builds. Grund: docker compose up --build baut das Image via Dockerfile, dort werden npm ci und npm run build im Build-Stage ausgefuehrt.

Compose direkt aus Git bauen (ohne git clone auf dem Server)

Du brauchst auf dem Server nur eine compose.yaml.

Beispiel:

docker compose up -d --build

Hinweis:

  • In compose.yaml ist der Build-Kontext fest auf https://git.jung.ms/myzinsky/hayanisator.git#main gesetzt.
  • Das #main im URL-Suffix waehlt den Branch.
  • Bei einem privaten Repo muss der Docker-Build auf dem Server Zugriff auf diese URL haben (z. B. ueber hinterlegte Credentials/Token).

Deployment-Idee fuer deinen Server

Minimaler Workflow:

  1. In privates Git-Repo pushen.
  2. Auf dem Server pullen.
  3. Docker-Image bauen.
  4. Container mit Port-Mapping starten oder via Reverse Proxy (Nginx/Traefik) einhaengen.

Beispiel-Update auf dem Server:

git pull
docker build -t hayanisator:latest .
docker stop hayanisator || true
docker rm hayanisator || true
docker run -d --name hayanisator --restart unless-stopped -p 8080:80 hayanisator:latest

Alternative mit Compose auf dem Server:

git pull
docker compose up -d --build