yunohost-apps / codimd_ynh Goto Github PK
View Code? Open in Web Editor NEWCodiMD package for YunoHost
Home Page: https://hackmd.io/
License: GNU General Public License v3.0
CodiMD package for YunoHost
Home Page: https://hackmd.io/
License: GNU General Public License v3.0
As proposed by @SISheogorath
We should add informations for codimed_ynh doing a PR on https://github.com/codimd/server/tree/master/docs/setup
Following a discussion on the chat, I'm opening this issue :
Turns out that there are currently "two" CodiMD
Related issue about naming if you want to read the whole drama : hackmdio/codimd#1219 ( I haven't really took the time to read the whole thing, the end of the thread seem to suggest the Hack MD team isn't so friendly but would need more time to really have an opinion)
The user I was originally discussing this was interested in hackmd-open-source-edition because it has more features.
Global issue to track what needs to be done to improve this app, and make it a fully fledged standard Yunohost app.
Forum topic: https://forum.yunohost.org/t/codimd-hackmd-fork-official-topic/11110
To be done (in an approximate order of priority, but any contribution is warmly welcome !):
community.json
YunoHost/apps#914Describe the bug
Installation fails
Versions
To Reproduce
Just install the package.
Expected behavior
Installed codimd.
The installation fails on this error. The fix is here : SemkoDev/field.cli#2
tl:dr : just remove --pure-lockfile
, it's now the default.
Not my issue, I'm referencing it here: https://forum.yunohost.org/t/codimd-cant-install-on-raspberry/13358
We'd love so much to see it working here at @MailTape for our YH instance <3
Could you share any news on your side regarding shipping please?
kisskiss
Describe the bug
When updating the application, /var/www/codimd/config.json
is overwritten, despite the README file which invites to tweak it.
Versions
yunohost app info codimd
To Reproduce
/var/www/codimd/config.json
and in the "production"section the following line:
"tooBusyLag": 10000,`/var/www/codimd/config.json
fileExpected behavior
You should see the "tooBusyLag": 10000,
line in the above file
Actual behavior
The line has disappeared.
Hi, thanks a lot for packaging codimd, I'd love to use it on ynh.
I tried to install it but it seems to require root installation, preventing other applications to be installed.
Is this a hard limitation? Any wait to circumvent it?
Thanks!
running yunohost tools upgrade apps
fails:
https://paste.yunohost.org/raw/ilesanobaj
seems it can't find the npm files.
2021-07-15 19:54:41,256: DEBUG - npm WARN tar ENOENT: no such file or directory, open '/var/www/codimd/node_modules/.staging/rxjs-1b0c9ab8/operator/zipAll.d.ts'
2021-07-15 19:54:41,256: DEBUG - npm WARN tar ENOENT: no such file or directory, open '/var/www/codimd/node_modules/.staging/rxjs-1b0c9ab8/operators/zipAll.d.ts'
2021-07-15 19:54:41,256: DEBUG - npm WARN tar ENOENT: no such file or directory, lstat '/var/www/codimd/node_modules/.staging/rxjs-1b0c9ab8/src/add'
2021-07-15 19:54:41,256: DEBUG - npm WARN tar ENOENT: no such file or directory, lstat '/var/www/codimd/node_modules/.staging/rxjs-1b0c9ab8/src/internal'
2021-07-15 19:54:41,256: DEBUG - npm WARN tar ENOENT: no such file or directory, lstat '/var/www/codimd/node_modules/.staging/rxjs-1b0c9ab8/src/operator'
2021-07-15 19:54:41,256: DEBUG - npm WARN tar ENOENT: no such file or directory, open '/var/www/codimd/node_modules/.staging/rxjs-1b0c9ab8/src/operators/zipAll.ts'
2021-07-15 19:54:41,256: DEBUG - npm WARN tar ENOENT: no such file or directory, open '/var/www/codimd/node_modules/.staging/rxjs-1b0c9ab8/src/LICENSE.txt'
2021-07-15 19:54:42,316: DEBUG - npm ERR! err.code.match is not a function
2021-07-15 19:54:42,349: DEBUG -
2021-07-15 19:54:42,349: DEBUG - npm ERR! A complete log of this run can be found in:
2021-07-15 19:54:42,349: DEBUG - npm ERR! /root/.npm/_logs/2021-07-15T23_54_42_332Z-debug.log
2021-07-15 19:54:42,366: DEBUG - + ynh_exit_properly
yunohost app info codimd
description: Collaborative editor to work on notes written in Markdown
domain_path: pad-old.libre.brussels/
name: CodiMD
version: 1.6.0~ynh8
CodiMD version 1.6 is out https://github.com/codimd/server/releases/tag/1.6.0
PR welcome :)
Hi,
I know this app is deprecated for hedgedoc, but as the repo is open, I still want to point out an (old) bug 😉
It turns out the backups don't include images that are uploaded in the "./public/upload" folder of the app. So after a restore (or the upgrade to hedgedoc), the notes are missing their images, even if the [img] reference is still present in the edit section of the note.
I can provide config details and logs as needed.
Thanks for your feedback, and maybe the issue will be transferred to https://github.com/YunoHost-Apps/hedgedoc_ynh ?
We need to implement change_url script. https://yunohost.org/#/packaging_apps_scripts
Trying to install CodiMD on yunohost / raspberry PI 3
( Debian 9.11 - yunohost stable version": "3.6.5.3")
Got a warning :
"WARNING - yarn: error: no such option: --pure-lockfile"
Extract of log file :
2020-02-17 10:21:19,965: DEBUG - + replace_string=**********
2020-02-17 10:21:19,966: DEBUG - + sudo sed --in-place s@DB_PASS@**********@g ../conf/.sequelizerc.example
2020-02-17 10:21:20,067: DEBUG - + cp ../conf/.sequelizerc.example /var/www/codimd/.sequelizerc
2020-02-17 10:21:20,068: DEBUG - + ynh_script_progression '--message=Building application... (this may take some time and resources!)'
2020-02-17 10:21:20,069: DEBUG - + set +x
2020-02-17 10:21:20,070: DEBUG - + set +x
2020-02-17 10:21:20,071: DEBUG - + echo '! Helper used in legacy mode !'
2020-02-17 10:21:20,072: DEBUG - + set +x
2020-02-17 10:21:20,073: DEBUG - + echo '[#######++...........] > Building application... (this may take some time and resources!)'
2020-02-17 10:21:20,074: DEBUG - + set -x
2020-02-17 10:21:20,075: DEBUG - + pushd /var/www/codimd
2020-02-17 10:21:20,075: DEBUG - /var/www/codimd /var/cache/yunohost/from_file/codimd_ynh-master/scripts
2020-02-17 10:21:20,076: DEBUG - + ./bin/setup
2020-02-17 10:21:20,077: DEBUG - copy config files
2020-02-17 10:21:20,078: DEBUG - install packages
2020-02-17 10:21:21,283: DEBUG - + ynh_exit_properly
2020-02-17 10:21:21,284: WARNING - Usage: yarn [options]
2020-02-17 10:21:21,286: INFO - [#######++...........] > Building application... (this may take some time and resources!)
2020-02-17 10:21:21,288: DEBUG - + local exit_code=2
2020-02-17 10:21:21,288: WARNING -
2020-02-17 10:21:21,290: DEBUG - + '[' 2 -eq 0 ']'
2020-02-17 10:21:21,291: WARNING - yarn: error: no such option: --pure-lockfile
2020-02-17 10:21:21,292: DEBUG - + trap '' EXIT
2020-02-17 10:21:21,293: DEBUG - + set +eu
2020-02-17 10:21:21,293: DEBUG - + sleep 0.5
2020-02-17 10:21:21,796: DEBUG - + ynh_print_err '--message=!!\n codimd'''s script has encountered an error. Its execution was cancelled.\n!!'
2020-02-17 10:21:21,797: DEBUG - + local legacy_args=m
2020-02-17 10:21:21,798: DEBUG - + args_array=([m]=message=)
2020-02-17 10:21:21,800: DEBUG - + declare -Ar args_array
2020-02-17 10:21:21,801: DEBUG - + local message
2020-02-17 10:21:21,802: DEBUG - + ynh_handle_getopts_args '--message=!!\n codimd'''s script has encountered an error. Its execution was cancelled.\n!!'
2020-02-17 10:21:21,804: DEBUG - + set +x
2020-02-17 10:21:21,905: DEBUG - + ynh_print_log '\e[91m\e[1m[ERR]\e[0m !!\n codimd'''s script has encountered an error. Its execution was cancelled.\n!!'
2020-02-17 10:21:21,907: WARNING - �[91m�[1m[ERR]�[0m !!
2020-02-17 10:21:21,912: DEBUG - + echo -e '\e[91m\e[1m[ERR]\e[0m !!\n codimd'''s script has encountered an error. Its execution was cancelled.\n!!'
2020-02-17 10:21:21,913: WARNING - codimd's script has encountered an error. Its execution was cancelled.
Describe the bug
CodiMD installation fails with FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
If I understand correctly, the VPS I'm on just lacks ram. I've kept an eye on htop
during installation and the 1GB ram got filled, and I think at least part of the swap too.
Versions
To Reproduce
Either from the webadmin or via ssh :
sudo yunohost app install codimd
Expected behavior
I hoped the installation would work fine. ^^
Logs
If applicable and useful, add screenshots to help explain your problem.
Full logs here : https://paste.yunohost.org/raw/inekuxewob
Describe the bug
The default tooBusyLag
value is a bit low (70ms). On my server (old computer), I get the * I'm busy right now, try again later* message very often, which is a bit annoying.
Even if that value can be tweaked, what to do you think increasing it by default? (I don't know, to 10000
if that's not too high)
Versions
Installing CodiMD fails on arm64 due to a dependency that isn't distributed in the architecture (specifically PhantomJS).
Should happen on any arm64 install (ie, sudo yunohost app install codimd
). This doesn't happen with HedgeDoc, which installs just fine (and which I didn't know about until looking into related issues).
Provided here: https://paste.yunohost.org/raw/ekazakugis
It should be noted that PhantomJS has never supplied prebuilt arm64 binaries. Therefore, either it'll need to be built in the script or an alternate binary will need to be found. (Or, instead, this app would be retired and replaced with HedgeDoc...)
Versions
To Reproduce
Steps to reproduce the behavior.
sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh.git
Expected behavior
App upgraded and working
Logs
Warning: Jun 21 11:11:40 npm[29455]: at connection.connect.err (/var/www/codimd/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)
Warning: Jun 21 11:11:40 npm[29455]: at Connection.connectingErrorHandler (/var/www/codimd/node_modules/pg/lib/client.js:194:14)
Warning: Jun 21 11:11:40 npm[29455]: at Connection.emit (events.js:198:13)
Warning: Jun 21 11:11:40 npm[29455]: at Socket.<anonymous> (/var/www/codimd/node_modules/pg/lib/connection.js:134:12)
Warning: Jun 21 11:11:40 npm[29455]: at Socket.emit (events.js:198:13)
Warning: Jun 21 11:11:40 npm[29455]: at addChunk (_stream_readable.js:288:12)
Warning: Jun 21 11:11:40 npm[29455]: at readableAddChunk (_stream_readable.js:269:11)
Warning: Jun 21 11:11:40 npm[29455]: at Socket.Readable.push (_stream_readable.js:224:10)
Warning: Jun 21 11:11:40 npm[29455]: at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
A new version 1.7 is coming soon... It is about time to transition this repo.
To do so I have created a new repo : https://github.com/YunoHost-Apps/hedgedoc_ynh that should be good to go as far as naming and links...
@kay0u pointed out the use of a Helper script to migrate files and database from CodiMD to HedgeDoc.
I am wondering if it is worth the effort to implement this...
Now that the app can be installed, we should implement backup and restore scripts.
Now that the app can be installed, we should allow our users to upgrade the app (especially because we have no backup script yet 😅).
When backup&restore tools will be implemented, we should implement a backup-before-upgrade tool.
Describe the bug
Today a user reported that the install failed with :
nginx: [emerg] "proxy_max_temp_file_size" directive invalid value in /etc/nginx/conf.d/pad.maindomain.tld.d/codimd.conf:21
Corresponding line in nginx.conf : https://github.com/YunoHost-Apps/codimd_ynh/blob/master/conf/nginx.conf#L21
Apparently commenting the line seems to solve the issue ... I'm puzzled on why these lines are necessary (8192m sounds like a lot ?!)
Versions
To Reproduce
Try to install the app ... though not sure where / how to reproduce exactly considering the tests on the CI are passing and so far no other users complained about it
Expected behavior
Instal completing successfully
Logs
If that app logs failed login attempts (?), we should implement fail2ban to protect logins.
Line 159 in cd594d5
Install via the yunohost webadmin ui fails on a raspberry pi 4 (4 GByte RAM) on buster cause an invalid nginx config parameter.
Full log: https://paste.yunohost.org/raw/ewafojehow
sudo yunohost app install codimd
codimd is installed
2022-03-05 16:39:53,681: WARNING - Job for nginx.service failed.
2022-03-05 16:39:53,682: WARNING - See "systemctl status nginx.service" and "journalctl -xe" for details.
2022-03-05 16:39:53,684: DEBUG - + ynh_exec_err journalctl --quiet --no-hostname --no-pager --lines=20 --unit=nginx
2022-03-05 16:39:53,684: DEBUG - + [[ 6 -eq 1 ]]
2022-03-05 16:39:53,685: DEBUG - ++ journalctl --quiet --no-hostname --no-pager --lines=20 --unit=nginx
2022-03-05 16:39:53,706: DEBUG - + ynh_print_err 'Mar 05 16:04:44 systemd[1]: Starting A high performance web server and a reverse proxy server...
2022-03-05 16:39:53,707: DEBUG - Mar 05 16:04:47 systemd[1]: Started A high performance web server and a reverse proxy server.
2022-03-05 16:39:53,707: DEBUG - Mar 05 16:17:40 systemd[1]: Reloading A high performance web server and a reverse proxy server.
[...]
2022-03-05 16:39:53,712: DEBUG - Mar 05 16:39:53 nginx[17309]: nginx: [emerg] "proxy_max_temp_file_size" directive invalid value in /etc/nginx/conf.d/pads.maindomain.tld.d/codimd.conf:17
2022-03-05 16:39:53,712: DEBUG - Mar 05 16:39:53 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
2022-03-05 16:39:53,713: DEBUG - Mar 05 16:39:53 systemd[1]: Reload failed for A high performance web server and a reverse proxy server.'
Full log: https://paste.yunohost.org/raw/ewafojehow
I can only assume, that on the raspberry the value of 'proxy_max_temp_file_size' of 8192m is too high (it was changed months before from 1024m) - but may be wrong?
c.f. https://ci-apps-bullseye.yunohost.org/ci/job/365
39439 INFO [##########+++++++...] > Building CodiMD... (this will take some time and resources!)
78905 WARNING gyp ERR! configure error
78905 WARNING gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
78906 WARNING gyp ERR! stack File "<string>", line 1
78907 WARNING gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
78907 WARNING gyp ERR! stack ^
78908 WARNING gyp ERR! stack SyntaxError: invalid syntax
78908 WARNING gyp ERR! stack
78956 WARNING gyp ERR! stack at ChildProcess.exithandler (child_process.js:299:12)
78957 WARNING gyp ERR! stack at ChildProcess.emit (events.js:193:13)
78957 WARNING gyp ERR! stack at maybeClose (internal/child_process.js:999:16)
78958 WARNING gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
78958 WARNING gyp ERR! System Linux 5.10.28-scaleway
78959 WARNING gyp ERR! command "/opt/node_n/n/versions/node/11.15.0/bin/node" "/opt/node_n/n/versions/node/11.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
78959 WARNING gyp ERR! cwd /var/www/codimd/node_modules/dtrace-provider
78960 WARNING gyp ERR! node -v v11.15.0
78960 WARNING gyp ERR! node-gyp -v v3.8.0
78960 WARNING gyp ERR! not ok
Calling /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]
doesn't work, because print
without brackets ()
is python 2 syntax ... But I don't know why npm/node/gyp would try to call python ...
Maybe moving to a newer version of npm/node/gyp would fix the issue ?
Users should be able to install this app in a sub-folder, not only on the root of their (sub)domain.
Does CodiMD and its nginx config allows that ? 🤔
Hello !
This is a friendly automatic notice from the Yunohost Apps team : our tool noticed that your app is pretty interesting but is not listed in the community list !
Please consider making a pull request to add it, such that people can easily learn about its existence from this page. If you declare your app as working, you might also benefit from automatic tests on the app C.I..
It is relevant to add your app to the list even if it's not working or unmaintained since it might still help people who might want to continue packaging the app. Just be sure to correctly flag it as notworking/unmaintained.
Checkout the README to learn how to add your app to the list (should take only a few minutes).
Datalove <3,
The YunoHost team.
Install fails with this error:
npm install
WARNING npm WARN deprecated [email protected]: Use uuid module instead
WARNING npm WARN deprecated [email protected]: New code is available at github.com/uNetworking/uWebSockets.js
WARNING npm WARN deprecated [email protected]: to-markdown has been renamed to Turndown, with a new API. Please update to turndown v4.0.0 or above and see the migration guide for details: https://github.com/domchristie/turndown/wiki/Migrating-from-to-markdown-to-Turndown
There are additional messages after those ones (I think it's npm error during the uninstall, because of uncomplete install), I can provide them if needed.
On an up-to-date VPS, latest Yunohost version, install fails.
After these two steps:
sudo --login --user=postgres PGUSER=postgres PGPASSWORD=Something psql codimd
sudo --login --user=postgres dropdb codimd
I get:
FATAL: terminating connection due to administrator command
WARNING server closed the connection unexpectedly
WARNING This probably means the server terminated abnormally
WARNING before or while processing the request.
WARNING connection to server was lost
Hi,
The app cannot be installed, webpack build fails at 84% :
2020-05-12 04:34:33,576: WARNING - <s> [webpack.Progress] 84% [0] building 1207/1208 modules 1 active /var/www/codimd/node_modules/viz.js/viz.js
2020-05-12 04:35:03,245: DEBUG - info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2020-05-12 04:35:03,247: WARNING - Killed
2020-05-12 04:35:03,249: DEBUG - + ynh_exit_properly
2020-05-12 04:35:03,249: WARNING - error Command failed with exit code 137.
2020-05-12 04:35:03,249: DEBUG - + local exit_code=137
2020-05-12 04:35:03,250: DEBUG - + '[' 137 -eq 0 ']'
2020-05-12 04:35:03,250: DEBUG - + trap '' EXIT
2020-05-12 04:35:03,250: DEBUG - + set +eu
2020-05-12 04:35:03,250: DEBUG - + sleep 0.5
2020-05-12 04:35:03,751: DEBUG - + type -t ynh_clean_setup
2020-05-12 04:35:03,751: WARNING -
2020-05-12 04:35:03,752: DEBUG - + ynh_die
2020-05-12 04:35:03,752: DEBUG - + local legacy_args=mc
2020-05-12 04:35:03,752: DEBUG - + args_array=([m]=message= [c]=ret_code=)
2020-05-12 04:35:03,752: DEBUG - + declare -Ar args_array
2020-05-12 04:35:03,752: DEBUG - + local message
2020-05-12 04:35:03,752: DEBUG - + local ret_code
2020-05-12 04:35:03,752: DEBUG - + ynh_handle_getopts_args
2020-05-12 04:35:03,752: DEBUG - + set +x
2020-05-12 04:35:03,752: DEBUG - + echo ''
2020-05-12 04:35:03,752: DEBUG - + exit 1
2020-05-12 04:35:03,899: ERROR - Impossible d'installer codimd: Une erreur est survenue dans le script d'installation de l'application
some strange warnings
install codimd
installed codimd without these warnings
Installing codimd...
Validating installation parameters...
Storing installation settings...
Finding an available port...
Installing dependencies...
Configuring system user...
Creating a PostgreSQL database...
Setting up source files...
Configuring NGINX web server...
Building CodiMD... (this will take some time and resources!)
Error verifying phantomjs, continuing { Error: Command failed: /usr/bin/phantomjs --version
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
at ChildProcess.exithandler (child_process.js:299:12)
at ChildProcess.emit (events.js:193:13)
at maybeClose (internal/child_process.js:999:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
killed: false,
code: 1,
signal: null,
cmd: '/usr/bin/phantomjs --version' }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
Modifying a config file...
Configuring a systemd service...
Integrating service in YunoHost...
Starting a systemd service...
The service codimd has correctly executed the action start.
Configuring permissions...
Reloading NGINX web server...
Installation of CodiMD completed
Installation completed
If applicable and useful, add screenshots to help explain your problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.