Initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{
|
||||
servers {
|
||||
listener_wrappers {
|
||||
proxy_protocol
|
||||
tls
|
||||
}
|
||||
trusted_proxies static 127.0.0.1/32 ::1/128
|
||||
}
|
||||
http_port 8080
|
||||
https_port 8443
|
||||
}
|
||||
|
||||
# Replace example.com with your domain. Requires web service on the same compose network.
|
||||
example.com {
|
||||
reverse_proxy web:80 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
|
||||
header {
|
||||
X-Content-Type-Options "nosniff"
|
||||
X-Frame-Options "DENY"
|
||||
Referrer-Policy "strict-origin-when-cross-origin"
|
||||
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
||||
}
|
||||
}
|
||||
|
||||
# API on same host (optional second site block)
|
||||
api.example.com {
|
||||
reverse_proxy main:8300 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
[Unit]
|
||||
Description=FromChat server
|
||||
After=multi-user.target
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=3
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
ExecStart=/bin/bash -c "docker compose up --remove-orphans --force-recreate"
|
||||
ExecStop=/bin/bash -c "docker compose down --remove-orphans"
|
||||
WorkingDirectory=/home/fromchat/fromchat-server
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StartLimitBurst=3
|
||||
|
||||
# Security settings
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ReadWritePaths=/var/log
|
||||
|
||||
# Logging
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
StandardInput=tty-force
|
||||
SyslogIdentifier=fromchat
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user