[Support] Linuxserver.io - CodiMD


Recommended Posts

linuxserver_medium.thumb.png.ee269a039a3ba13bbb900a153cc71e63.png

Application Name: CodiMD
Application Site: https://demo.codimd.org/
Docker Hub: https://hub.docker.com/r/linuxserver/codimd/
Github: https://github.com/linuxserver/docker-codimd

 

Please post any questions/issues relating to this docker you have in this thread.

If you are not using Unraid (and you should be!) then please do not post here, rather use the linuxserver.io forum for support.

Link to comment
  • 4 weeks later...

Hi so I'm reading through this page and trying to wrap my head around this works. Everything I've set up in the past has just used a configuration file. Is this image set up the same way? Am I just supposed to throw variables into the config.json file?

The default config.json looks like:

{
  "use_env_variable": "CMD_DB_URL"
}

I found where CMD_DB_URL is on this page. However, I am confused how that is translated into the correct database URL.

Bottom line, I'd like to know more about how this docker is customized using the json file and I'd like to further understand how the default configuration even works. Thanks.

Link to comment
1 hour ago, ndaringer said:

Hi so I'm reading through this page and trying to wrap my head around this works. Everything I've set up in the past has just used a configuration file. Is this image set up the same way? Am I just supposed to throw variables into the config.json file?

The default config.json looks like:


{
  "use_env_variable": "CMD_DB_URL"
}

I found where CMD_DB_URL is on this page. However, I am confused how that is translated into the correct database URL.

Bottom line, I'd like to know more about how this docker is customized using the json file and I'd like to further understand how the default configuration even works. Thanks.

 

There is no difference of how this works in a docker install and a normal install. You can either use environment variables or set the correct setting, with the right formatting in the settings file.

As that is more to do with the application itself, it's better to ask the codimd guys. I don't know if they have a forum or discord/slack for support.

 

I'm not sure why you are not using the provided variables in the template for setting up the database connection.

Edited by saarg
Link to comment
  • 1 month later...
10 hours ago, saarg said:

Does it work locally, not going through your reverse proxy?

I can't really test that. Beside using oauth, I'd have to change the config to edit the domain and such.

When attempted as is, firefox throws security errors and won't load part of the page.

Link to comment

Okay, did some testing and I believe the current docker image is broken.

  • Version 1.5.0-ls12: Image broken. Seems to be missing the correct public/build files to run.
  • Version 1.5.0-ls11: Image broken. Throws error in console: `s6-applyuidgid: fatal: unable to exec ./node_modules/sequelize-cli/bin/sequelize: No such file or directory`
  • Version 1.4.0-ls11: Works. Has insecure pdf support, but is functional.


My instance isn't public, so I'll fall back for now until it's been looked at and fixed.

Link to comment
  • 3 weeks later...

Hello. I need to increase the permissible length of the document beyond the standard 100,000 characters. My config.json: ``{ "documentMaxLength": "CMD_documentMaxLength" , "use_env_variable": "CMD_DB_URL" } `` And docker command line: `docker run -dit --name=codimd --link mariadb:mariadb -e PUID=1000 -e PGID=1000 -e DB_HOST=mariadb -e DB_PORT=3306 -e DB_USER=codimd -e DB_PASS=805235io -e DB_NAME=codimd -e TZ=Europe/Kiev -p 3000:3000 -v /home/pirate/codimd/config:/config -e CMD_DOMAIN=doc.uabp.ml -e CMD_IMAGE_UPLOAD_TYPE=filesystem -e CMD_documentMaxLength=200000 --restart unless-stopped linuxserver/codimd:arm32v7-latest` Unfortunately, this parameter cannot be changed. Please help to increase the permissible length of the document.

 

Link to comment
15 hours ago, kroschu said:

Hello. I need to increase the permissible length of the document beyond the standard 100,000 characters. My config.json: ``{ "documentMaxLength": "CMD_documentMaxLength" , "use_env_variable": "CMD_DB_URL" } `` And docker command line: `docker run -dit --name=codimd --link mariadb:mariadb -e PUID=1000 -e PGID=1000 -e DB_HOST=mariadb -e DB_PORT=3306 -e DB_USER=codimd -e DB_PASS=805235io -e DB_NAME=codimd -e TZ=Europe/Kiev -p 3000:3000 -v /home/pirate/codimd/config:/config -e CMD_DOMAIN=doc.uabp.ml -e CMD_IMAGE_UPLOAD_TYPE=filesystem -e CMD_documentMaxLength=200000 --restart unless-stopped linuxserver/codimd:arm32v7-latest` Unfortunately, this parameter cannot be changed. Please help to increase the permissible length of the document.

Just set your "documentMaxLength" to 2000000 in the config and remove the CMD_documentMaxLength from the template. In fact I have almost everything done in just the config file.

Going to let the others know, the docker image is still broken, though I guess the arm build is okay. Just to clarify, Version 1.4.0-ls11 is the last build I can get working.

Edited by Ryonez
Formatting
Link to comment
  • 4 months later...

Running into an issue with getting this docker started up. Have I missed anything obvious?

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='codimd' --net='bridge' --log-opt max-size='50m' --log-opt max-file='1' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'DB_HOST'='192.168.1.12' -e 'DB_PORT'='3306' -e 'DB_NAME'='codidb' -e 'DB_USER'='codimd' -e 'DB_PASS'='password' -e 'PUID'='99' -e 'PGID'='100' -p '3000:3000/tcp' -v '/mnt/user/appdata/codimd':'/config':'rw' 'linuxserver/codimd'

da6074975cab5107f72c0f6849c8b746711ed65bcd9b49524160984f8a7f5ae5

The command finished successfully!

The log shows this error, and the error is just repeated endlessly.

 

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

[4mSequelize CLI [Node: 10.18.1, CLI: 5.5.0, ORM: 5.8.12][24m

Loaded configuration file "../../config/config.json".

[31mERROR:[39m getaddrinfo ENOTFOUND codimd codimd:3306


[4mSequelize CLI [Node: 10.18.1, CLI: 5.5.0, ORM: 5.8.12][24m

Loaded configuration file "../../config/config.json".

[31mERROR:[39m getaddrinfo ENOTFOUND codimd codimd:3306


[4mSequelize CLI [Node: 10.18.1, CLI: 5.5.0, ORM: 5.8.12][24m

Loaded configuration file "../../config/config.json".

[31mERROR:[39m getaddrinfo ENOTFOUND codimd codimd:3306

Thanks for a nice looking docker! :)

Link to comment
  • 3 weeks later...
On 1/28/2020 at 6:54 PM, wazabees said:

The log shows this error, and the error is just repeated endlessly.

 


[4mSequelize CLI [Node: 10.18.1, CLI: 5.5.0, ORM: 5.8.12][24m

Loaded configuration file "../../config/config.json".

[31mERROR:[39m getaddrinfo ENOTFOUND codimd codimd:3306

 

I am getting the exact same error message. MariaDB is running on IP X.X.X.11 and I have set the environment variable accordingly (DB_HOST and CMD_DB_URL like stated in the config.json). Still, the error message is showing that codimd is looking for the database on the IP X.X.X.26 (which is the IP address for the codimd container). Any ideas anyone?

Link to comment
  • 2 weeks later...
  • 8 months later...

Having issues getting a nginx reverse proxy to work. Would that be better to ask here or over on the SWAG support thread? My error is a 502 bad gateway, but I'm a bit lost on determining if it's something with the .conf file in nginx or the environment settings I'm passing into the CodiMD container.

Link to comment
5 hours ago, J_Hizzal said:

Having issues getting a nginx reverse proxy to work. Would that be better to ask here or over on the SWAG support thread? My error is a 502 bad gateway, but I'm a bit lost on determining if it's something with the .conf file in nginx or the environment settings I'm passing into the CodiMD container.

Swag is the most appropriate thread as it is an issue with reverse proxy.

502 means that swag can't reach CodiMD.

Link to comment
  • 2 months later...
5 hours ago, gcoulthard said:

Is there any chance that this unRAID docker app will be updated to Hedgedoc (https://hedgedoc.org/) - the next iteration of Codimd? (Sorry, just a home user of unRAID, not a developer or docker creator.)

No. We already have new container for hedgedoc. Have you searched CA for it?

Unsure of you can just change the repo and "upgrade", in case you want to test it, backup your appdata first.

Link to comment
  • 10 months later...

I haven't found a Support Thread for the hedgedoc Container/Template, so I guess I'll continue here.
The support thread link on the package should link here btw, it does redirect to the GitHub only.

 


I'm quite new to Unraid and Docker, but all "Apps" I tested until now, ran with default settings or made clear what I needed to fill out.

I've installed the Hedgedoc App, but the connection to the (3000) port is being refused. 
Checking the editable container options, I can't see anything that should matter.

In the Docker Notes I saw that mariadb was used, and I whondered whether I might have to install that seperately? (But since this is based on docker, why ?)
I also skimmed through a few pages of this thread, there was the talk about a config file, but I have yet to find the mention of that in any of the Doc / Info I found related to Unraid...

 

Link to comment
1 hour ago, wambo said:


In the Docker Notes I saw that mariadb was used, and I whondered whether I might have to install that seperately? (But since this is based on docker, why ?)
I also skimmed through a few pages of this thread, there was the talk about a config file, but I have yet to find the mention of that in any of the Doc / Info I found related to Unraid...



It's considered bad practice to lump major containers from outside of your project into your container as far as I know. That's not to say there aren't cases where it's a good idea, for example building upon the base images, or maybe using the ngnix image if your thing needs a web service to function. Databases are one of those things where it's better to host one database container, then have other containers talk to that and use their own database in there. For example, one database container can host the databases for hedgedoc, keycloak, kanboard, etc. You have one container managing them all.

Next to the install button (for hedgedocs in the Community Apps page) is a support button. Clicking that shows a Read Me First link at the top. This links to what's used to generate the docs you have linked above it seems.

Hedgedoc does require a db. I'm using postgres as mysql database container, which my hedgedoc talks to.

I suggest spending some time learning about databases. Don't just make a root user and password and give that to hedgedoc. You'll want to use this for other things down the line, so make a user and database for each service to use.

I'd recommend postgres for the database, and pgadmin4 as a web tool you can use to work on the databases.

If you are serving things to others (I consider it a thing to just do even if you're the only one using things), I really recommend securing things behind a reverse proxy with a valid https and a domain. I have my containers on a user defined bridge network, and only really expos ports where needed, like for the reverse proxy. You don't need to expose postgres's ports (like 5432). Exposing lets things on the lan access that port, container images don't need that. If you do do that, be awere anything with a templateurl will add then back on later, which is frankly frustrating as hell.
I do take a more "I want to secure things as much as I can" approach. It's a lot of work, not everyone will need or be bothered by it. The docs and use of LinuxServer's Swag container would be a good place to start for the last little bit I dumped on ya: https://docs.linuxserver.io/general/swag

Servers administration is a handful, good luck.

Link to comment
7 minutes ago, Ryonez said:

Databases are one of those things where it's better to host one database container, then have other containers talk to that and use their own database in there. For example, one database container can host the databases for hedgedoc, keycloak, kanboard, etc. You have one container managing them all.

For less experienced users, I recommend multiple database containers each with their own app connected. Since the docker engine shares image layers, the extra storage is extremely minimal, a few KB for the config files.

 

The advantages of being able to blow away a single database without affecting the others while not needing to know database management commands is helpful.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.