Curious: anybody tried installing hackmd? (aka codimd)

Hiya,

I’ve been using hackmd.io for creating and sharing slidedecks, collaborative notes, ‘books’, class notes, course websites, etc on and off for a while. I’ve been content to use the free hosted service, though I have spun up a heroku version in the past… anyway, the code is dockerized GitHub - hackmdio/codimd: CodiMD - Realtime collaborative markdown notes on all platforms. and I wondered if anyone had given it a try on Reclaim Cloud yet?

…I figure I should probably do this, as it’s never good to not be in control, right?

I haven’t yet, but I’ve heard from a few friends who recently tried out the UI for the first time. Their indication was that it seemed a nicer collaborative experience than Etherpad, so I’m definitely tempted.

As ever, however, some were a bit disappointed by the flavor of the markdown which is never consistent from one application to another.

I’ve used hackmd.io for a couple of classes; wasn’t really bothered by the flavour of markdown in those cases, but I can see how that might be a nuisance, yeah.

I had a few minutes to play, so I gave this a spin GitHub - codimd/container: CodiMD container image resources in a docker dohicky in reclaim.

No joy. Of course, I don’t know what I’m doing, very little experience with docker. Anyway, something to fiddle with. The instructions seemed pretty straightforward:

Run `docker-compose up` in your terminal
Wait until see the log HTTP Server listening at port 3000, it will take few minutes based on your internet connection.
Open http://127.0.0.1:3000

…but of course, it’s never straightforward…

Alrighty! Some progress -

I added an endpoint to the docker container, 3000, and now codimd loads up at mydomain.etc.etc:3000

So two more things to figure out: how to sort out the config so i can actually register/login (there must be some database stuff going on that I haven’t touched yet), and b: can i just get the endpoint to not be part of the url? I don’t know the technical phrasing for that.

Baby steps, baby steps…

Ah - figured it out.

In container/docker-compose.yml at master · codimd/container · GitHub there’s a line:

   ports:
      # Ports that are published to the outside.
      # The latter port is the port inside the container. It should always stay on 3000
      # If you only specify a port it'll published on all interfaces. If you want to use a
      # local reverse proxy, you may want to listen on 127.0.0.1.
      # Example:
      # - "127.0.0.1:3000:3000"
      - "3000:3000"

So I changed that to “80:3000” and it’s now running at my domain, and I can register/login. I don’t know whether I really needed to add that endpoint. But, for reference, here’s the full procedure:

  • make a new docker container
  • in webssh, git clone https://github.com/codimd/container.git codimd-container then cd codimd-container directory
  • i used the nano editor to edit the config: nano docker-compose.yml and changed line 79 to 80:3000
  • under settings for the docker container, there’s an option to add an endpoint, which I did for 3000
  • back in webssh, I fired up the container with docker-compose up

…and went over to my domain, ta da!

…now: how to get https for this rather than http…

I tried it a bit in the past but nothing helpful to share… I would be most interested in seeing what you get going though @Shawn🙂 I’ve been playing around with docsify.js.org myself for something similar…