mirror of
https://github.com/YunoHost-Apps/penpot_ynh.git
synced 2024-09-03 19:56:56 +02:00
Finalizing....
This commit is contained in:
parent
b946a43556
commit
7769311270
9 changed files with 68 additions and 15 deletions
|
@ -12,11 +12,6 @@ WorkingDirectory=__INSTALL_DIR__/exporter
|
||||||
ExecStart=__YNH_NODE__ --env-file=.env app.js
|
ExecStart=__YNH_NODE__ --env-file=.env app.js
|
||||||
Restart=always
|
Restart=always
|
||||||
Environment=__YNH_NODE_LOAD_PATH__
|
Environment=__YNH_NODE_LOAD_PATH__
|
||||||
Environment=NODE_ENV=production
|
|
||||||
Environment=PENPOT_HTTP_SERVER_PORT=__PORT_EXPORTER__
|
|
||||||
Environment=PENPOT_HTTP_SERVER_host="127.0.0.1"
|
|
||||||
Environment=PENPOT_PUBLIC_URI="https://__DOMAIN__"
|
|
||||||
Environment=PENPOT_REDIS_URI="redis://127.0.0.1:6379/__REDIS_DB__"
|
|
||||||
StandardOutput=append:/var/log/__APP__/__APP__-exporter.log
|
StandardOutput=append:/var/log/__APP__/__APP__-exporter.log
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
|
@ -1,4 +1,25 @@
|
||||||
#sub_path_only rewrite ^$ / permanent;
|
#sub_path_only rewrite ^$ / permanent;
|
||||||
|
|
||||||
|
location @handle_redirect {
|
||||||
|
set $redirect_uri "$upstream_http_location";
|
||||||
|
set $redirect_host "$upstream_http_x_host";
|
||||||
|
set $redirect_cache_control "$upstream_http_cache_control";
|
||||||
|
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
proxy_set_header Host "$redirect_host";
|
||||||
|
proxy_hide_header etag;
|
||||||
|
proxy_hide_header x-amz-id-2;
|
||||||
|
proxy_hide_header x-amz-request-id;
|
||||||
|
proxy_hide_header x-amz-meta-server-side-encryption;
|
||||||
|
proxy_hide_header x-amz-server-side-encryption;
|
||||||
|
proxy_pass $redirect_uri;
|
||||||
|
|
||||||
|
add_header x-internal-redirect "$redirect_uri";
|
||||||
|
add_header x-cache-control "$redirect_cache_control";
|
||||||
|
add_header cache-control "$redirect_cache_control";
|
||||||
|
}
|
||||||
|
|
||||||
location /assets {
|
location /assets {
|
||||||
proxy_pass http://127.0.0.1:__PORT__/assets;
|
proxy_pass http://127.0.0.1:__PORT__/assets;
|
||||||
recursive_error_pages on;
|
recursive_error_pages on;
|
||||||
|
@ -37,10 +58,12 @@ location /api/export {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api {
|
location /api {
|
||||||
|
client_max_body_size 100M;
|
||||||
proxy_pass http://127.0.0.1:__PORT__/api;
|
proxy_pass http://127.0.0.1:__PORT__/api;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /ws/notifications {
|
location /ws/notifications {
|
||||||
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
proxy_pass http://127.0.0.1:__PORT__/ws/notifications;
|
proxy_pass http://127.0.0.1:__PORT__/ws/notifications;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
The app url is <https://__DOMAIN____PATH__>
|
The app url is <https://__DOMAIN____PATH__>
|
||||||
|
|
||||||
You can log in by using `<user>@__DOMAIN__` e-mail and your Yunohost password.
|
You can log in by using `<user>@__MAIN_DOMAIN__` e-mail as your username and your Yunohost password.
|
|
@ -42,10 +42,9 @@ ram.runtime = "50M"
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
|
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://github.com/penpot/penpot/archive/refs/tags/1.19.2.tar.gz"
|
url = "https://github.com/penpot/penpot/archive/refs/tags/1.19.3.tar.gz"
|
||||||
sha256 = "14de5b71f13f0fd542234f16fa5a307fbee7088bdfa343a53ff923b3f95f4edb"
|
sha256 = "2649db3bd8742540f76f33547095b227e86c5bda74908a900011b8516d4bb3ce"
|
||||||
autoupdate.strategy = "latest_github_release"
|
|
||||||
|
|
||||||
[resources.sources.jdk]
|
[resources.sources.jdk]
|
||||||
amd64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz"
|
amd64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz"
|
||||||
amd64.sha256 = "454bebb2c9fe48d981341461ffb6bf1017c7b7c6e15c6b0c29b959194ba3aaa5"
|
amd64.sha256 = "454bebb2c9fe48d981341461ffb6bf1017c7b7c6e15c6b0c29b959194ba3aaa5"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
nodejs_version=18
|
nodejs_version=20
|
||||||
current_hash="1eaf7b2b44a9e8928a70d9a882f4372602700695"
|
current_hash="1eaf7b2b44a9e8928a70d9a882f4372602700695"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -10,9 +10,11 @@ source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
redis_db=$(ynh_redis_get_free_db)
|
redis_db=$(ynh_redis_get_free_db)
|
||||||
secret_key=$(ynh_string_random --length=40)
|
secret_key=$(ynh_string_random --length=40)
|
||||||
|
main_domain=$(yunohost domain list --output-as plain | grep -A1 -e '#main' | tail -n 1)
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=redis_db --value=$redis_db
|
ynh_app_setting_set --app=$app --key=redis_db --value=$redis_db
|
||||||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||||
|
ynh_app_setting_set --app=$app --key=main_domain --value=$main_domain
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
|
@ -116,11 +118,24 @@ mkdir -p $install_dir/exporter
|
||||||
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
||||||
chown -R $app:$app $install_dir/exporter
|
chown -R $app:$app $install_dir/exporter
|
||||||
chmod -R 700 $install_dir/exporter
|
chmod -R 700 $install_dir/exporter
|
||||||
|
|
||||||
|
ynh_secure_remove --file=$install_dir/.cache
|
||||||
|
|
||||||
pushd $install_dir/exporter
|
pushd $install_dir/exporter
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
ynh_script_progression --message="Cleaning up..." --weight=1
|
||||||
|
|
||||||
|
ynh_secure_remove --file=$install_dir/.npm
|
||||||
|
ynh_secure_remove --file=$install_dir/.yarn
|
||||||
|
ynh_secure_remove --file=$install_dir/build
|
||||||
|
ynh_secure_remove --file=$install_dir/.m2
|
||||||
|
ynh_secure_remove --file=$install_dir/.clojure
|
||||||
|
ynh_secure_remove --file=$install_dir/clojure
|
||||||
|
ynh_secure_remove --file=$install_dir/babashka
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
2
sources/extra_files/app/.gitignore
vendored
2
sources/extra_files/app/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
2
sources/patches/.gitignore
vendored
2
sources/patches/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
25
sources/patches/main-001.patch
Normal file
25
sources/patches/main-001.patch
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
From 43585e806da2002b4b070489e2f6db6aafb3ca2f Mon Sep 17 00:00:00 2001
|
||||||
|
From: orhtej2 <2871798+orhtej2@users.noreply.github.com>
|
||||||
|
Date: Sat, 10 Feb 2024 20:01:35 +0100
|
||||||
|
Subject: [PATCH] Don't use zygote and GPU for export.
|
||||||
|
|
||||||
|
---
|
||||||
|
exporter/src/app/browser.cljs | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/exporter/src/app/browser.cljs b/exporter/src/app/browser.cljs
|
||||||
|
index 3cbcf2b98..c2c44e774 100644
|
||||||
|
--- a/exporter/src/app/browser.cljs
|
||||||
|
+++ b/exporter/src/app/browser.cljs
|
||||||
|
@@ -100,7 +100,7 @@
|
||||||
|
|
||||||
|
(def browser-pool-factory
|
||||||
|
(letfn [(create []
|
||||||
|
- (p/let [opts #js {:args #js ["--font-render-hinting=none"]}
|
||||||
|
+ (p/let [opts #js {:args #js ["--font-render-hinting=none", "--disable-gpu", "--no-zygote"]}
|
||||||
|
browser (.launch pw/chromium opts)
|
||||||
|
id (swap! pool-browser-id inc)]
|
||||||
|
(l/info :origin "factory" :action "create" :browser-id id)
|
||||||
|
--
|
||||||
|
2.42.0.windows.2
|
||||||
|
|
Loading…
Add table
Reference in a new issue