shortcuts / this-week-in-neovim.org

this-week-in-neovim.org official webapp repository

Home Page:https://this-week-in-neovim.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This Week In Neovim

This repository holds the source code of https://this-week-in-neovim.org.

Architecture

The website is composed of two main pieces:

  • back, the backend binary. It has different roles:
    • As a web server, it responds to requests, such as /, /latest, weekly news, RSS feeds, etc. and serves the right content. Served content is cached with a TTL (currently 1 day but that might change).
    • It runs in a dedicated thread a notify file watcher, connected to a directory which contents is the contents repository. If a new weekly is added, it automatically loads it.
  • twin, the Rust library for representing weekly news, parsing, converting Markdown to HTMl, etc. etc.

How does it run in production

  1. The backend is compiled with cargo build --release and pushed to a remote production server.
  2. On that server, a clone of this repository runs git fetch and git rebase origin/master (that repository always stays on master).
  3. Then, a docker image is built by running docker build .. See the [Dockerfile][./Dockerfile]. That process copies the binary into the image as long as the server configuration, static files. A directory is created to be able to read from the contents repository.
  4. Once the image is built, docker tag is run twice: once to create the twin:M.N.P SemVer image, and another time to create twin:latest.
  5. A docker-compose project is restarted with twin:latest and the webapp runs.

Automatic updates every Monday

On every Monday, a git script is run by a systemd unit, according to a timer. That script simply git pull --rebase in the right host directory (which is mounted in the docker container). For short: thanks to the notify thread and mounting the volume in the docker container, there is no service interruption to do to release a new weekly: the only thing is to merge to master on the contents repository before every Morning CET. The refresh date time is currently set on Monday 9:00 AM CET.

Licences

The source code of the website itself (i.e. this very repository) is licensed with the BSD-3 New Clause.

However, the actual content this is published (the “weekly news”) is licensed with CC-BY-SA-4.0. The license can be found here.

About

this-week-in-neovim.org official webapp repository

https://this-week-in-neovim.org

License:Other


Languages

Language:Rust 76.5%Language:HTML 21.9%Language:Dockerfile 1.3%Language:Shell 0.2%Language:CSS 0.1%