45 lines
1.2 KiB
YAML
Executable File
45 lines
1.2 KiB
YAML
Executable File
|
|
version: "3.8"
|
|
|
|
services:
|
|
node-app:
|
|
image: node:20-alpine
|
|
container_name: AppRobotConfig
|
|
user: "root" # allow binding privileged port 80
|
|
working_dir: /app
|
|
volumes:
|
|
- ./app:/app # mount your Node.js app code here
|
|
- ./public:/app/public
|
|
- ./data:/app/public/data
|
|
command: ["node", "server.js"]
|
|
|
|
expose:
|
|
- "80" # optional, nur Doku innerhalb des Netzwerks
|
|
ports:
|
|
- "8080:80" # <-- Host-Port 8080 auf Container-Port 8
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
reverse-tunnel:
|
|
image: alpine:latest
|
|
container_name: reverse-tunnel
|
|
depends_on:
|
|
- node-app
|
|
volumes:
|
|
- ./client/ssh/tunnel_ed25519:/tmp/tunnel_ed25519:ro
|
|
- ./client/ssh/known_hosts:/root/.ssh/known_hosts:ro
|
|
command: >
|
|
sh -c "apk add --no-cache openssh &&
|
|
mkdir -p /root/.ssh &&
|
|
install -m 600 /tmp/tunnel_ed25519 /root/.ssh/id_ed25519 &&
|
|
exec ssh -p 2222 -N -T
|
|
-R 0.0.0.0:9000:node-app:80
|
|
-i /root/.ssh/id_ed25519
|
|
-o ExitOnForwardFailure=yes
|
|
-o ServerAliveInterval=30
|
|
-o ServerAliveCountMax=3
|
|
tunnel@thinkcentre.local"
|
|
|
|
restart: unless-stopped
|