sorgenti del sito web di BgLUG https://bglug.it
Go to file
paspo b6a5246ec0
All checks were successful
Linting markdown on PR / unicode-check (pull_request) Successful in 2m20s
fix copypaste typo
2024-08-10 13:58:38 +02:00
.gitea/workflows fix copypaste typo 2024-08-10 13:58:38 +02:00
archetypes
assets/sass pulsante copia codice (#169) 2024-07-30 21:57:17 +00:00
config/_default add footer commit info (#188) 2024-08-06 20:04:00 +00:00
content rimmozione tag html (#185) 2024-08-04 08:40:36 +00:00
data
docker/rootfs
import/hugo-export/wp-content/uploads
layouts add footer commit info (#188) 2024-08-06 20:04:00 +00:00
static fontawesome upgrade 6.6.0 (#183) 2024-08-03 19:49:10 +00:00
themes
.dockerignore faster build (#189) 2024-08-07 09:19:25 +00:00
.editorconfig
.gitignore
.gitmodules
.markdownlint.yaml markdownlint per le PR 2024-08-10 12:14:50 +02:00
config.yml fontawesome upgrade 6.6.0 (#183) 2024-08-03 19:49:10 +00:00
Dockerfile buildcache (#159) 2024-07-28 09:49:36 +00:00
LICENSE
README.md

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