Libreschool website
Go to file
2024-07-04 20:50:41 +00:00
.gitea/workflows mattermost notification 2024-05-15 23:06:38 +02:00
archetypes initial commit 2023-11-28 23:04:12 +01:00
content privacy policy 2024-06-22 14:44:23 +02:00
docker/rootfs log rotation 2024-03-04 18:10:47 +01:00
layouts menu pagina progetto 2023-12-08 10:58:28 +01:00
static added robots.txt and favicon 2023-12-01 00:23:32 +01:00
themes added theme, maybe 2023-11-28 23:18:50 +01:00
urls ignoriamo gli archivi mensili 2023-12-06 21:35:34 +01:00
.dockerignore docker image support 2023-12-01 22:17:06 +01:00
.gitignore initial commit 2023-11-28 23:04:12 +01:00
.gitmodules cleanup 2023-12-12 21:59:32 +01:00
config.yml italiano di default 2024-07-04 21:41:27 +02:00
Dockerfile log rotation 2024-03-04 18:10:47 +01:00
LICENSE Initial commit 2023-11-28 21:43:12 +00:00
README.md log rotation 2024-03-04 18:10:47 +01:00

libreschool.org

Libreschool website

Development instructions

Clone repo with the command:

git clone --recurse-submodules ssh://git@git.libreschool.org:1022/LibreSchool/libreschool.org.git
cd libreschool.org

If you did clone this repo in the usual way, you probably missed the theme's git submodule. To download the missing submodule:

cd libreschool.org
git submodule update --init --recursive

Then start the hugo live server:

hugo serve

or

docker run --rm -d --name hugo_ls -v "$PWD:/src" -p "1313:1313" git.libreschool.org/bglug/hugo-extended:latest serve -s /src --gc --minify --bind 0.0.0.0

You can produce the complete website with:

hugo

The complete website will be placed in the public directory.

Building the container image

This website can be used as a container image; to do so in docker:

docker build -t libreschool-website .

Then you can run the image:

docker run -d -p 6080:80 libreschool-website

With the above command, the website will be reachable via HTTP to port 6080.

It's also possible do bind mount the container's /logs directory, to expose nginx logs.

Using the container image

Plain docker invocation

docker run -d --name libreschool_website -p 6080:80 git.libreschool.org/libreschool/libreschool.org:latest

Via docker compose

version: "3.9"
services:
  web:
    image: git.libreschool.org/libreschool/libreschool.org:latest
    restart: always
    container_name: libreschool_website
    volumes:
      - ./logs:/logs
    ports:
      - 6080:80

Configure log rotation

By default logs are stored in a volume mounted on /logs directory inside the container. The access log file is /logs/nginx.access.log and it is rotate daily with a configurable retention, 7 days by default.

version: "3.9"
services:
  web:
    image: git.libreschool.org/libreschool/libreschool.org:latest
    restart: always
    container_name: libreschool_website
    volumes:
      - ./logs:/logs
    environment:
      LOG_DAYS: 14
    ports:
      - 6080:80