mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-07 22:10:16 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 95f9c8040e | |||
| 292561163c | |||
| 76aa58d6c4 | |||
| 4442360cd9 | |||
| 7bc2815df7 | |||
| 1e722e8bd7 | |||
| 91e9cc699c |
@@ -573,12 +573,27 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
## 2026-11-07
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- EspoCRM ([#18519](https://github.com/community-scripts/ProxmoxVE/pull/18519))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- RomM: emit player isolation headers from the serving location [@adotagarwal](https://github.com/adotagarwal) ([#18511](https://github.com/community-scripts/ProxmoxVE/pull/18511))
|
||||
|
||||
- #### 💥 Breaking Changes
|
||||
|
||||
- fix: gotenberg: update to v9 [@CrazyWolf13](https://github.com/CrazyWolf13) ([#18491](https://github.com/community-scripts/ProxmoxVE/pull/18491))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- nvidia: close the hardware acceleration step when no GPU is usable | pin the whole NVIDIA userspace to the host's driver version [@MickLesk](https://github.com/MickLesk) ([core#215](https://github.com/community-scripts/core/pull/215))
|
||||
- fix: stage release downloads on disk, not in /tmp [@rcourtman](https://github.com/rcourtman) ([core#218](https://github.com/community-scripts/core/pull/218))
|
||||
- Minor fixes: restart php-fpm during sigpipe, Install jq for forge commands [@MickLesk](https://github.com/MickLesk) ([core#213](https://github.com/community-scripts/core/pull/213))
|
||||
- incus: name the project restriction that refuses an Incus launch [@MickLesk](https://github.com/MickLesk) ([core#214](https://github.com/community-scripts/core/pull/214))
|
||||
|
||||
## 2026-11-06
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Masked-Kunsiquat
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.espocrm.com/ | Github: https://github.com/espocrm/espocrm
|
||||
|
||||
APP="EspoCRM"
|
||||
var_tags="${var_tags:-crm;business}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_admin_user="${var_admin_user:-}"
|
||||
export var_admin_pass="${var_admin_pass:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/espocrm ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "espo-crm" "espocrm/espocrm"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop nginx cron php8.4-fpm
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="data custom client/custom" fetch_and_deploy_gh_release "espo-crm" "espocrm/espocrm" "prebuild" "latest" "/opt/espocrm" "EspoCRM-*.zip"
|
||||
|
||||
msg_info "Migrating EspoCRM"
|
||||
cd /opt/espocrm
|
||||
$STD php bin/command clear-cache
|
||||
if ! $STD php bin/command migrate; then
|
||||
chown -R www-data:www-data /opt/espocrm
|
||||
systemctl start php8.4-fpm
|
||||
systemctl start cron nginx
|
||||
msg_error "Migration failed; customizations may be incompatible. Check /opt/espocrm/data/logs, then run update again."
|
||||
exit 1
|
||||
fi
|
||||
chown -R www-data:www-data /opt/espocrm
|
||||
msg_ok "Migrated EspoCRM"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start php8.4-fpm
|
||||
systemctl start cron nginx
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/mozilla-services/syncstorage-rs
|
||||
|
||||
APP="Firefox-Syncserver"
|
||||
var_tags="${var_tags:-sync;firefox}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-3072}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
#var_arm64="${var_arm64:-yes}" # built from source, nothing x86-only, but not yet run on arm64
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /usr/local/bin/syncserver ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "firefox-syncserver" "mozilla-services/syncstorage-rs"; then
|
||||
msg_info "Stopping Firefox Syncserver"
|
||||
systemctl stop firefox-syncserver
|
||||
msg_ok "Stopped Firefox Syncserver"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "firefox-syncserver" "mozilla-services/syncstorage-rs" "tarball"
|
||||
setup_rust
|
||||
|
||||
msg_info "Building Firefox Syncserver (Patience)"
|
||||
cd /opt/firefox-syncserver
|
||||
$STD cargo build --release --locked --no-default-features --features=syncstorage-db/postgres --features=tokenserver-db/postgres --features=py_verifier
|
||||
cp target/release/syncserver /usr/local/bin/syncserver
|
||||
rm -rf target
|
||||
$STD uv venv --python /usr/bin/python3 /opt/firefox-syncserver/.venv
|
||||
$STD uv pip install --python /opt/firefox-syncserver/.venv/bin/python pyfxa tokenlib cryptography
|
||||
msg_ok "Built Firefox Syncserver"
|
||||
|
||||
msg_info "Starting Firefox Syncserver"
|
||||
systemctl start firefox-syncserver
|
||||
msg_ok "Started Firefox Syncserver"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}In Firefox, set identity.sync.tokenserver.uri in about:config to:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}http://${IP}:8000/1.0/sync/1.5${CL}"
|
||||
+21
-9
@@ -107,8 +107,9 @@ function update_script() {
|
||||
ln -sfn "$ROMM_BASE"/resources /opt/romm/frontend/dist/assets/romm/resources
|
||||
ln -sfn "$ROMM_BASE"/assets /opt/romm/frontend/dist/assets/romm/assets
|
||||
if [[ -f /etc/angie/http.d/romm.conf ]]; then
|
||||
if ! grep -q "js_content decode.decodeBase64" /etc/angie/http.d/romm.conf; then
|
||||
msg_info "Adding missing /decode and /cache locations to Angie config"
|
||||
if ! grep -q "js_content decode.decodeBase64" /etc/angie/http.d/romm.conf ||
|
||||
! grep -q "coep_header" /etc/angie/http.d/romm.conf; then
|
||||
msg_info "Updating Angie config (decode/cache locations, player isolation headers)"
|
||||
dpkg -l angie-module-njs &>/dev/null || $STD apt install -y angie-module-njs
|
||||
grep -q "ngx_http_js_module.so" /etc/angie/angie.conf || sed -i '1i load_module modules/ngx_http_js_module.so;' /etc/angie/angie.conf
|
||||
mkdir -p /etc/angie/js "${ROMM_BASE}/cache"
|
||||
@@ -147,6 +148,20 @@ map \$http_upgrade \$connection_upgrade {
|
||||
'' close;
|
||||
}
|
||||
|
||||
# COEP/COOP for the EmulatorJS and js-dos players (SharedArrayBuffer needs a
|
||||
# crossOriginIsolated document). Matched on \$request_uri because try_files
|
||||
# rewrites \$uri to /index.html before add_header runs, so a per-location
|
||||
# add_header on the player route never fires. Mirrors upstream RomM's
|
||||
# docker/nginx/templates/default.conf.template.
|
||||
map \$request_uri \$coep_header {
|
||||
default "";
|
||||
~^/rom/.*/(ejs|jsdos)(\?|\$) "require-corp";
|
||||
}
|
||||
map \$request_uri \$coop_header {
|
||||
default "";
|
||||
~^/rom/.*/(ejs|jsdos)(\?|\$) "same-origin";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
@@ -155,6 +170,9 @@ server {
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
add_header Cross-Origin-Embedder-Policy \$coep_header;
|
||||
add_header Cross-Origin-Opener-Policy \$coop_header;
|
||||
}
|
||||
|
||||
location /assets {
|
||||
@@ -164,12 +182,6 @@ server {
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location ~ ^/rom/.*/ejs\$ {
|
||||
add_header Cross-Origin-Embedder-Policy "require-corp";
|
||||
add_header Cross-Origin-Opener-Policy "same-origin";
|
||||
try_files \$uri /index.html;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://romm_backend;
|
||||
proxy_buffering off;
|
||||
@@ -209,7 +221,7 @@ server {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
msg_ok "Added /decode and /cache locations"
|
||||
msg_ok "Updated Angie config"
|
||||
else
|
||||
sed -i -e "s|alias .*/library/;|alias ${ROMM_BASE}/library/;|" \
|
||||
-e "s|alias .*/cache/;|alias ${ROMM_BASE}/cache/;|" /etc/angie/http.d/romm.conf
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Masked-Kunsiquat
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.espocrm.com/ | Github: https://github.com/espocrm/espocrm
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
if [[ -z "${var_admin_user:-}" ]]; then
|
||||
var_admin_user=$(prompt_input "EspoCRM admin username (a-z, 0-9, @ . _ -):" "admin" 60)
|
||||
fi
|
||||
var_admin_user="${var_admin_user:-admin}"
|
||||
var_admin_user="${var_admin_user,,}"
|
||||
if [[ ! "$var_admin_user" =~ ^[a-z0-9@._-]+$ ]]; then
|
||||
msg_warn "EspoCRM usernames take only a-z, 0-9 and @ . _ -; using admin"
|
||||
var_admin_user="admin"
|
||||
fi
|
||||
if [[ -z "${var_admin_pass:-}" ]]; then
|
||||
var_admin_pass=$(random_password 16)
|
||||
fi
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="espocrm" MARIADB_DB_USER="espocrm" setup_mariadb_db
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="ldap" setup_php
|
||||
fetch_and_deploy_gh_release "espo-crm" "espocrm/espocrm" "prebuild" "latest" "/opt/espocrm" "EspoCRM-*.zip"
|
||||
|
||||
msg_info "Configuring EspoCRM"
|
||||
cd /opt/espocrm
|
||||
$STD php bin/command config:populate
|
||||
$STD php bin/command config:set defaultPermissions.user www-data
|
||||
$STD php bin/command config:set defaultPermissions.group www-data
|
||||
$STD php bin/command config:set database.platform Mysql
|
||||
$STD php bin/command config:set database.host localhost
|
||||
$STD php bin/command config:set database.dbname "$MARIADB_DB_NAME"
|
||||
$STD php bin/command config:set database.user "$MARIADB_DB_USER"
|
||||
$STD php bin/command config:set database.password "$MARIADB_DB_PASS"
|
||||
$STD php bin/command rebuild
|
||||
$STD php bin/command create-admin-user "$var_admin_user"
|
||||
printf '%s\n' "$var_admin_pass" | $STD php bin/command set-password "$var_admin_user"
|
||||
$STD php bin/command config:set siteUrl "http://${LOCAL_IP}"
|
||||
$STD php bin/command populate-scheduled-jobs
|
||||
$STD php bin/command config:set jobRunInParallel true --type=bool
|
||||
$STD php bin/command app-check
|
||||
$STD php bin/command config:set isInstalled true --type=bool
|
||||
chown -R www-data:www-data /opt/espocrm
|
||||
msg_ok "Configured EspoCRM"
|
||||
|
||||
msg_info "Creating Nginx Site"
|
||||
PHP_SOCK=$(get_php_fpm_socket)
|
||||
cat <<EOF >/etc/nginx/sites-available/espocrm
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
|
||||
charset utf-8;
|
||||
index index.html index.php;
|
||||
|
||||
client_max_body_size 128M;
|
||||
keepalive_timeout 300;
|
||||
server_tokens off;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_read_timeout 300;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/css text/javascript application/javascript application/json;
|
||||
gzip_min_length 1000;
|
||||
|
||||
root /opt/espocrm/public;
|
||||
|
||||
location /client {
|
||||
root /opt/espocrm;
|
||||
autoindex off;
|
||||
|
||||
location ~* ^.+\.(js|css|png|jpg|svg|svgz|jpeg|gif|ico|tpl)\$ {
|
||||
access_log off;
|
||||
expires max;
|
||||
}
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
location ~ \.php\$ {
|
||||
fastcgi_pass unix:${PHP_SOCK};
|
||||
include fastcgi_params;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
fastcgi_param QUERY_STRING \$query_string;
|
||||
}
|
||||
|
||||
location /api/v1/ {
|
||||
if (!-e \$request_filename) {
|
||||
rewrite ^/api/v1/(.*)\$ /api/v1/index.php last;
|
||||
}
|
||||
}
|
||||
|
||||
location /portal/ {
|
||||
try_files \$uri \$uri/ /portal/index.php?\$query_string;
|
||||
}
|
||||
|
||||
location /api/v1/portal-access {
|
||||
if (!-e \$request_filename) {
|
||||
rewrite ^/api/v1/(.*)\$ /api/v1/portal-access/index.php last;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ /(\.htaccess|web\.config|\.git) {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
msg_ok "Created Nginx Site"
|
||||
nginx_enable_site "espocrm"
|
||||
|
||||
msg_info "Setting up Cron"
|
||||
cat <<EOF >/etc/cron.d/espocrm
|
||||
* * * * * www-data cd /opt/espocrm && php -f cron.php >/dev/null 2>&1
|
||||
EOF
|
||||
systemctl enable -q --now cron
|
||||
msg_ok "Set up Cron"
|
||||
|
||||
msg_info "Saving Credentials"
|
||||
cat <<EOF >>~/espocrm.creds
|
||||
|
||||
EspoCRM Admin
|
||||
Username: ${var_admin_user}
|
||||
Password: ${var_admin_pass}
|
||||
EOF
|
||||
chmod 600 ~/espocrm.creds
|
||||
msg_ok "Saved Credentials"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,99 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/mozilla-services/syncstorage-rs
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
libpq-dev \
|
||||
python3-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="18" setup_postgresql
|
||||
PG_DB_NAME="syncserver" PG_DB_USER="syncserver" setup_postgresql_db
|
||||
setup_rust
|
||||
setup_uv
|
||||
|
||||
fetch_and_deploy_gh_release "firefox-syncserver" "mozilla-services/syncstorage-rs" "tarball"
|
||||
|
||||
msg_info "Building Firefox Syncserver (Patience)"
|
||||
cd /opt/firefox-syncserver
|
||||
$STD cargo build --release --locked --no-default-features --features=syncstorage-db/postgres --features=tokenserver-db/postgres --features=py_verifier
|
||||
cp target/release/syncserver /usr/local/bin/syncserver
|
||||
rm -rf target
|
||||
$STD uv venv --python /usr/bin/python3 /opt/firefox-syncserver/.venv
|
||||
$STD uv pip install --python /opt/firefox-syncserver/.venv/bin/python pyfxa tokenlib cryptography
|
||||
msg_ok "Built Firefox Syncserver"
|
||||
|
||||
msg_info "Configuring Firefox Syncserver"
|
||||
mkdir -p /opt/firefox-syncserver_data
|
||||
cat <<EOF >/opt/firefox-syncserver_data/.env
|
||||
SYNC_HOST=0.0.0.0
|
||||
SYNC_PORT=8000
|
||||
SYNC_MASTER_SECRET=$(openssl rand -hex 32)
|
||||
SYNC_HUMAN_LOGS=true
|
||||
RUST_LOG=info
|
||||
SYNC_SYNCSTORAGE__DATABASE_URL=postgres://syncserver:${PG_DB_PASS}@127.0.0.1:5432/syncserver
|
||||
SYNC_SYNCSTORAGE__GLEAN_ENABLED=false
|
||||
SYNC_TOKENSERVER__ENABLED=true
|
||||
SYNC_TOKENSERVER__RUN_MIGRATIONS=true
|
||||
SYNC_TOKENSERVER__DATABASE_URL=postgres://syncserver:${PG_DB_PASS}@127.0.0.1:5432/syncserver
|
||||
SYNC_TOKENSERVER__NODE_TYPE=postgres
|
||||
SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN=api.accounts.firefox.com
|
||||
SYNC_TOKENSERVER__FXA_OAUTH_SERVER_URL=https://oauth.accounts.firefox.com
|
||||
SYNC_TOKENSERVER__INIT_NODE_URL=http://${LOCAL_IP}:8000
|
||||
EOF
|
||||
chmod 600 /opt/firefox-syncserver_data/.env
|
||||
cat <<'EOF' >/opt/firefox-syncserver_data/nodes.sql
|
||||
SELECT to_regclass('nodes') IS NOT NULL AS ready \gset
|
||||
\if :ready
|
||||
UPDATE nodes SET node = :'url'
|
||||
WHERE id = (SELECT min(id) FROM nodes)
|
||||
AND NOT EXISTS (SELECT 1 FROM nodes WHERE node = :'url');
|
||||
UPDATE users SET nodeid = (SELECT id FROM nodes WHERE node = :'url')
|
||||
WHERE nodeid <> (SELECT id FROM nodes WHERE node = :'url');
|
||||
DELETE FROM nodes WHERE node <> :'url';
|
||||
\endif
|
||||
EOF
|
||||
msg_ok "Configured Firefox Syncserver"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/firefox-syncserver.service
|
||||
[Unit]
|
||||
Description=Firefox Syncserver
|
||||
After=network.target postgresql.service
|
||||
Wants=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/firefox-syncserver
|
||||
EnvironmentFile=/opt/firefox-syncserver_data/.env
|
||||
Environment=PYTHONPATH=/opt/firefox-syncserver/.venv/lib/python3.13/site-packages
|
||||
ExecStartPre=/usr/bin/psql -1 -q -v ON_ERROR_STOP=1 -v url=\${SYNC_TOKENSERVER__INIT_NODE_URL} -f /opt/firefox-syncserver_data/nodes.sql \${SYNC_TOKENSERVER__DATABASE_URL}
|
||||
ExecStart=/usr/local/bin/syncserver
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now firefox-syncserver
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
+19
-8
@@ -257,15 +257,33 @@ map $http_upgrade $connection_upgrade {
|
||||
'' close;
|
||||
}
|
||||
|
||||
# COEP/COOP for the EmulatorJS and js-dos players (SharedArrayBuffer needs a
|
||||
# crossOriginIsolated document). Matched on $request_uri because try_files
|
||||
# rewrites $uri to /index.html before add_header runs, so a per-location
|
||||
# add_header on the player route never fires. Mirrors upstream RomM's
|
||||
# docker/nginx/templates/default.conf.template.
|
||||
map $request_uri $coep_header {
|
||||
default "";
|
||||
~^/rom/.*/(ejs|jsdos)(\?|$) "require-corp";
|
||||
}
|
||||
map $request_uri $coop_header {
|
||||
default "";
|
||||
~^/rom/.*/(ejs|jsdos)(\?|$) "same-origin";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /opt/romm/frontend/dist;
|
||||
client_max_body_size 0;
|
||||
|
||||
# Frontend SPA
|
||||
# Frontend SPA - also emits the player isolation headers: the player URLs
|
||||
# fall through try_files to /index.html, which this location serves
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
add_header Cross-Origin-Embedder-Policy $coep_header;
|
||||
add_header Cross-Origin-Opener-Policy $coop_header;
|
||||
}
|
||||
|
||||
# Static assets
|
||||
@@ -276,13 +294,6 @@ server {
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# EmulatorJS player - requires COOP/COEP headers for SharedArrayBuffer
|
||||
location ~ ^/rom/.*/ejs$ {
|
||||
add_header Cross-Origin-Embedder-Policy "require-corp";
|
||||
add_header Cross-Origin-Opener-Policy "same-origin";
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
# Backend API
|
||||
location /api {
|
||||
proxy_pass http://romm_backend;
|
||||
|
||||
Reference in New Issue
Block a user