Initial release: DictIA v0.8.14-alpha (fork de Speakr, AGPL-3.0)
This commit is contained in:
83
deployment/config/nginx/dictia.conf
Normal file
83
deployment/config/nginx/dictia.conf
Normal file
@@ -0,0 +1,83 @@
|
||||
# DictIA — Nginx reverse proxy configuration
|
||||
#
|
||||
# Alternative to Tailscale Serve for exposing DictIA over HTTPS.
|
||||
# Replace YOUR_DOMAIN with your actual domain name.
|
||||
#
|
||||
# Install: sudo cp dictia.conf /etc/nginx/sites-available/dictia
|
||||
# sudo ln -s /etc/nginx/sites-available/dictia /etc/nginx/sites-enabled/
|
||||
# sudo nginx -t && sudo systemctl reload nginx
|
||||
#
|
||||
# For HTTPS with Let's Encrypt:
|
||||
# sudo certbot --nginx -d YOUR_DOMAIN
|
||||
|
||||
upstream dictia_app {
|
||||
server 127.0.0.1:8899;
|
||||
}
|
||||
|
||||
upstream asr_proxy {
|
||||
server 127.0.0.1:9090;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name YOUR_DOMAIN;
|
||||
|
||||
# Redirect HTTP to HTTPS (uncomment after certbot setup)
|
||||
# return 301 https://$host$request_uri;
|
||||
|
||||
client_max_body_size 500M;
|
||||
|
||||
# DictIA app
|
||||
location / {
|
||||
proxy_pass http://dictia_app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# WebSocket support (for real-time features)
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# Long timeouts for transcription uploads
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
proxy_connect_timeout 60s;
|
||||
}
|
||||
|
||||
# ASR Proxy dashboard (optional, restrict access)
|
||||
location /asr-proxy/ {
|
||||
proxy_pass http://asr_proxy/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
# HTTPS server block (managed by certbot, uncomment after setup)
|
||||
# server {
|
||||
# listen 443 ssl;
|
||||
# server_name YOUR_DOMAIN;
|
||||
#
|
||||
# ssl_certificate /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem;
|
||||
# include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
#
|
||||
# client_max_body_size 500M;
|
||||
#
|
||||
# location / {
|
||||
# proxy_pass http://dictia_app;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# proxy_http_version 1.1;
|
||||
# proxy_set_header Upgrade $http_upgrade;
|
||||
# proxy_set_header Connection "upgrade";
|
||||
# proxy_read_timeout 3600s;
|
||||
# proxy_send_timeout 3600s;
|
||||
# }
|
||||
# }
|
||||
15
deployment/config/systemd/dictia.service
Normal file
15
deployment/config/systemd/dictia.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=DictIA - Docker Compose Application
|
||||
After=docker.service
|
||||
Requires=docker.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/opt/dictia
|
||||
ExecStart=/usr/bin/docker compose -f deployment/docker/docker-compose.cloud.yml up -d
|
||||
ExecStop=/usr/bin/docker compose -f deployment/docker/docker-compose.cloud.yml down
|
||||
TimeoutStartSec=120
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
52
deployment/config/tailscale/setup-serve.sh
Normal file
52
deployment/config/tailscale/setup-serve.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
# DictIA — Tailscale Serve/Funnel setup
|
||||
#
|
||||
# Exposes DictIA and ASR Proxy dashboard via Tailscale HTTPS.
|
||||
# Based on the VPS production configuration.
|
||||
#
|
||||
# Usage:
|
||||
# bash setup-serve.sh [serve|funnel]
|
||||
# serve — accessible only within your tailnet (default)
|
||||
# funnel — accessible from the public internet
|
||||
set -euo pipefail
|
||||
|
||||
MODE="${1:-serve}"
|
||||
|
||||
echo "=== DictIA Tailscale Setup ==="
|
||||
echo "Mode: $MODE"
|
||||
echo
|
||||
|
||||
# Verify Tailscale is connected
|
||||
if ! tailscale status >/dev/null 2>&1; then
|
||||
echo "ERROR: Tailscale is not running or not connected."
|
||||
echo " Install: curl -fsSL https://tailscale.com/install.sh | sh"
|
||||
echo " Connect: sudo tailscale up"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HOSTNAME=$(tailscale status --json | python3 -c "import sys,json; print(json.load(sys.stdin)['Self']['DNSName'].rstrip('.'))" 2>/dev/null || echo "unknown")
|
||||
echo "Tailscale hostname: $HOSTNAME"
|
||||
echo
|
||||
|
||||
# DictIA app on :443 → localhost:8899
|
||||
echo "[1/2] Setting up DictIA app (port 443 → 8899)..."
|
||||
if [ "$MODE" = "funnel" ]; then
|
||||
tailscale funnel --bg --https=443 http://localhost:8899
|
||||
else
|
||||
tailscale serve --bg --https=443 http://localhost:8899
|
||||
fi
|
||||
|
||||
# ASR Proxy dashboard on :9443 → localhost:9090
|
||||
echo "[2/2] Setting up ASR Proxy dashboard (port 9443 → 9090)..."
|
||||
if [ "$MODE" = "funnel" ]; then
|
||||
tailscale funnel --bg --https=9443 http://localhost:9090
|
||||
else
|
||||
tailscale serve --bg --https=9443 http://localhost:9090
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "=== Setup complete ==="
|
||||
echo "DictIA: https://$HOSTNAME/"
|
||||
echo "ASR Dashboard: https://$HOSTNAME:9443/"
|
||||
echo
|
||||
echo "Verify with: tailscale serve status"
|
||||
Reference in New Issue
Block a user