sorgenti di https://bglug.it
Go to file
paspo 37fb0f0900
Some checks failed
Container Publish / build-image (push) Failing after 3m18s
fix some minor ics issues (#275)
fixes #274

Reviewed-on: BgLUG/bglug.it#275
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-10-05 09:57:26 +00:00
.gitea/workflows build hugo senza container esterno (#273) 2024-10-03 06:16:07 +00:00
archetypes fix archetipi (#258) 2024-09-25 19:45:57 +00:00
assets homepage highlight icons cliccabili (#268) 2024-09-29 19:10:29 +00:00
config/_default add footer commit info (#188) 2024-08-06 20:04:00 +00:00
content ics calendar (#265) 2024-10-02 13:22:48 +00:00
data homepage highlight icons cliccabili (#268) 2024-09-29 19:10:29 +00:00
docker/rootfs fix some minor ics issues (#275) 2024-10-05 09:57:26 +00:00
i18n linuxday per anno (#257) 2024-09-25 19:48:44 +00:00
layouts fix some minor ics issues (#275) 2024-10-05 09:57:26 +00:00
static dimezzata dimensione banner homepage (#244) 2024-09-20 19:50:36 +00:00
themes tema hugo-arcana (#74) 2024-07-09 21:10:03 +00:00
.dockerignore faster build (#189) 2024-08-07 09:19:25 +00:00
.editorconfig editorconfig 2024-04-16 22:22:37 +02:00
.gitignore modifiche file MD (#1) 2024-06-20 15:40:17 +00:00
.gitmodules tema hugo-arcana (#74) 2024-07-09 21:10:03 +00:00
.markdownlint.yaml pull request linting (#191) 2024-08-10 15:37:26 +00:00
config.yml ics calendar (#265) 2024-10-02 13:22:48 +00:00
Dockerfile fix typo (#242) 2024-09-19 20:38:02 +00:00
LICENSE import iniziale 2024-04-09 23:12:57 +02:00
README.md dev notes 2024-04-16 23:33:34 +02:00

bglug.it

BgLUG website

Development instructions

Clone repo with the command:

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

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

cd bglug.it
git submodule update --init --recursive

Then start the hugo live server:

hugo server

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.

Development misc notes

The imported posts are marked as "draft" and as such aren't rendered in the final output. If you want to render all the drafts, you can add the -D flag:

hugo server -D

Building the container image

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

docker build -t bglug-website .

Then you can run the image:

docker run -d -p 6080:80 bglug-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 bglug_website -p 6080:80 git.libreschool.org/bglug/bglug.it:latest

Via docker compose

version: "3.9"
services:
  web:
    image: git.libreschool.org/libreschool/bglug.it:latest
    restart: always
    container_name: bglug_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/bglug/bglug.it:latest
    restart: always
    container_name: bglug_website
    volumes:
      - ./logs:/logs
    environment:
      LOG_DAYS: 14
    ports:
      - 6080:80