feat: Docker stack for PI WEB + Pi behind Traefik/Authelia
Compose services, Dockerfile, and deploy notes for pi.schwenk.online with OpenRouter and external Authelia middleware. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+70
@@ -0,0 +1,70 @@
|
||||
# PI WEB + Pi Coding Agent behind Traefik + Authelia (external)
|
||||
# Deploy: /home/frank/pi.schwenk.online → https://pi.schwenk.online
|
||||
|
||||
services:
|
||||
sessiond:
|
||||
build: .
|
||||
image: pidevremote-pi:local
|
||||
container_name: pi-sessiond
|
||||
restart: unless-stopped
|
||||
command: ["pi-web-sessiond"]
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
HOME: /home/node
|
||||
PI_WEB_CONFIG: /etc/pi-web/config.json
|
||||
PI_WEB_DATA_DIR: /data/pi-web
|
||||
PI_WEB_SESSIOND_SOCKET: /data/pi-web/sessiond.sock
|
||||
PI_CODING_AGENT_DIR: /home/node/.pi/agent
|
||||
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
|
||||
volumes:
|
||||
- ./data/pi-web:/data/pi-web
|
||||
- ./data/pi-agent:/home/node/.pi/agent
|
||||
- ${WORKSPACE_HOST_PATH:-./workspaces}:/workspaces
|
||||
networks:
|
||||
- internal
|
||||
|
||||
web:
|
||||
build: .
|
||||
image: pidevremote-pi:local
|
||||
container_name: pi-web
|
||||
restart: unless-stopped
|
||||
command: ["pi-web-server"]
|
||||
depends_on:
|
||||
- sessiond
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
HOME: /home/node
|
||||
PI_WEB_CONFIG: /etc/pi-web/config.json
|
||||
PI_WEB_DATA_DIR: /data/pi-web
|
||||
PI_WEB_SESSIOND_SOCKET: /data/pi-web/sessiond.sock
|
||||
PI_WEB_HOST: "0.0.0.0"
|
||||
PI_WEB_PORT: "8504"
|
||||
PI_WEB_ALLOWED_HOSTS: pi.schwenk.online
|
||||
PI_CODING_AGENT_DIR: /home/node/.pi/agent
|
||||
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
|
||||
volumes:
|
||||
- ./data/pi-web:/data/pi-web
|
||||
- ./data/pi-agent:/home/node/.pi/agent
|
||||
- ${WORKSPACE_HOST_PATH:-./workspaces}:/workspaces
|
||||
# No host port publish — Traefik reaches the container on the traefik network
|
||||
expose:
|
||||
- "8504"
|
||||
networks:
|
||||
- internal
|
||||
- traefik
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik
|
||||
- traefik.http.routers.pi.rule=Host(`pi.schwenk.online`)
|
||||
- traefik.http.routers.pi.entrypoints=websecure
|
||||
- traefik.http.routers.pi.tls.certresolver=myresolver
|
||||
- traefik.http.routers.pi.middlewares=authelia@docker
|
||||
- traefik.http.services.pi.loadbalancer.server.port=8504
|
||||
|
||||
networks:
|
||||
internal:
|
||||
driver: bridge
|
||||
traefik:
|
||||
external: true
|
||||
Reference in New Issue
Block a user