Sign inSign up

haanlaurent/class-notes-board

By haanlaurent

•Updated 7 months ago

Lightweight PHP + Apache notes board with SQLite persistence and bind-mounted image gallery.

Image
0

799

haanlaurent/class-notes-board repository overview

⁠Class Notes Board

Class Notes Board is a small PHP + Apache web application. It saves notes in SQLite and can show image files from a gallery folder.

⁠Quick Reference

  • Image name: haanlaurent/class-notes-board
  • Internal web port: 80
  • Notes data folder: /var/lib/classboard
  • SQLite file: /var/lib/classboard/classboard.sqlite
  • Gallery folder: /opt/classboard/gallery

⁠What Is Included

  • Notes can be created, edited, and deleted
  • The SQLite database is created automatically on first start
  • The app title and colors can be changed with environment variables
  • The gallery page can read image files from another folder

⁠Running This Image

To use this image, connect a host port of your choice to the internal port 80.

Use the environment variables from the table below if you want to change the title or the colors.

If you want to keep notes when you change containers, make sure /var/lib/classboard is stored outside the container.

If you want to show your own images in the gallery, use /opt/classboard/gallery as the gallery folder inside the container.

⁠Configuration

VariableDefaultAllowed valuesDescription
APP_TITLEClass Notes Boardany stringTitle shown in the app header
APP_THEMElightlight, darkMain color theme
APP_ACCENTblueblue, green, orange, tealAccent color for buttons and other main UI elements

If APP_THEME or APP_ACCENT has an invalid value, the default value is used.

⁠Data Persistence

If you want to save your notes while changing containers, it is recommended to create a volume for /var/lib/classboard.

The gallery page reads image files from /opt/classboard/gallery. If you want to load external images, it is recommended to create a bind mount for this folder.

Supported extensions:

  • .png
  • .jpg
  • .jpeg
  • .webp
  • .gif

⁠Using Docker Compose

If you want to work with Docker Compose, start with a template like this and replace the placeholder values with your own settings:

services:
  YOUR_CONTAINER_NAME:
    image: YOUR_IMAGE_NAME
    ports:
      - "HOST_PORT:INTERNAL_PORT"
    environment:
      VARIABLE_NAME: "VALUE"
      ANOTHER_VARIABLE: "VALUE"
    volumes:
      - VOLUME_OR_HOST_PATH:CONTAINER_PATH
      - ANOTHER_VOLUME_OR_HOST_PATH:ANOTHER_CONTAINER_PATH

volumes:
  YOUR_VOLUME_NAME:

⁠Extending the Image

If you want to improve this image, it can be useful to update the internal PHP version from PHP 8.3 to PHP 8.4.

For a manual test, run the package/module changes inside the container and then restart the container from the host.

# run inside the container
apt-get update
apt-get install -y php8.4 php8.4-sqlite3 libapache2-mod-php8.4
a2dismod php8.3
a2enmod php8.4

# run on the host
docker restart YOUR_CONTAINER_NAME

Doing this by hand is useful for testing, but it only changes the current container. To make the change reproducible, use a Dockerfile:

FROM haanlaurent/class-notes-board

RUN COMMAND
RUN ANOTHER_COMMAND
RUN ONE_MORE_COMMAND

If you want Docker Compose to build that Dockerfile automatically, use build in your compose template:

services:
  YOUR_CONTAINER_NAME:
    build: PATH_TO_FOLDER_CONTAINING_DOCKERFILE
    ports:
      - "HOST_PORT:INTERNAL_PORT"
    environment:
      VARIABLE_NAME: "VALUE"
      ANOTHER_VARIABLE: "VALUE"
    volumes:
      - VOLUME_OR_HOST_PATH:CONTAINER_PATH
      - ANOTHER_VOLUME_OR_HOST_PATH:ANOTHER_CONTAINER_PATH

volumes:
  YOUR_VOLUME_NAME:

⁠Endpoints

  • / - notes page
  • /gallery.php - gallery page

Tag summary

Content type

Image

Digest

sha256:c1f7fdce0…

Size

98.2 MB

Last updated

7 months ago

docker pull haanlaurent/class-notes-board