Sign inSign up

niceshot/codimdlist

By niceshot

•Updated over 5 years ago

Show Note List of CodiMD

Image
0

62

niceshot/codimdlist repository overview

⁠Make a list of all CodiMD notes.

CodiMD⁠ is a great tool and it's my favorite.
I use it for internal use with docker-compose with official install method( described here How to install⁠) .

But I feel inconvenient that I can't get the note list written by others. So I made additional web application( codimdlist ) to show the list of CodiMD notes.
You can use this by adding this docker image to CodiMD's docker-compose.yml.

codimdlist only see the CodiMD's database, never writes.

version: "3"
services:
  database:
    image: postgres:11.6-alpine
    environment:
      - POSTGRES_USER=codimd
      - POSTGRES_PASSWORD=change_password
      - POSTGRES_DB=codimd
    volumes:
      - "database-data:/var/lib/postgresql/data"
    ports:
      - "5432:5432"
    restart: always
  codimd:
    image: hackmdio/hackmd:2.2.0-cjk
    environment:
      - CMD_DB_URL=postgres://codimd:change_password@database/codimd
      - CMD_USECDN=false
    depends_on:
      - database
    ports:
      - "3000:3000"
    volumes:
      - upload-data:/home/hackmd/app/public/uploads
    restart: always
+  codimdlist:
+    image: niceshot/codimdlist:1.0
+   environment:
+      - CMD_CODIMD_URL=http(s)://(CodiMD's URL):3000
+      - CMD_DB_URL=postgres://codimd:change_password@database/codimd
+      - CMD_PERMISSION=SIGNED_IN
+      - CMD_LANG=ja
+    ports:
+     - "3001:3001"
+    depends_on:
+      - database
+    working_dir: /home/nodejs/codimdList
+    command: /bin/node js/index.js
volumes:
  database-data: {}
  upload-data: {}

⁠environment for codimdlist

parameterrequired/optionalvalues
CMD_CODIMD_URLrequiredCodiMD's URL, (ex) http://localhost:3000/⁠
CMD_DB_URLrequireddatabase information, same as codimd's CMD_DB_URL
CMD_PERMISSIONoptionalALL: search all notes
SIGNED_IN: (default) search notes excluded private
GUEST: search notes only for GUEST
CMD_LANGoptionallanguage, now "en" and "ja" are available, default=en

⁠how to use

After "docker-compose up -d", access the URL with opened port, for example "http://localhost:3001⁠".
ports:
left[any number to access by browser]: right [3001(fixed)]

You can change the LANG anytime, using url parameter "lang".
For example, http://localhost:3001?lang=ja⁠

Search keyword affects note's title and owner.

Tag summary

Content type

Image

Digest

Size

130.1 MB

Last updated

over 5 years ago

docker pull niceshot/codimdlist:1.0