Coder Social home page Coder Social logo

gabmus / this-week-in-neovim.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hadronized/this-week-in-neovim.org

0.0 1.0 0.0 149 KB

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

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

License: Other

Shell 0.17% Rust 76.49% CSS 0.13% HTML 21.92% Dockerfile 1.28%

this-week-in-neovim.org's Introduction

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.

this-week-in-neovim.org's People

Contributors

hadronized avatar diktomat avatar codicocodes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.