🌻Cyberia HqCalendar

The Layer Zero Calendar

The Layer Zero public calendar is run with a software called Gancio. It is a public, semi-anonymous events publishing system that is federated with other programs using the ActivityPub protocol. Anyone can see the published events on the website, calendar.layerze.ro, or from their fediverse account by following @layerzeroevents@calendar.layerze.ro. The program is currently running on its own Alpine Linux capsul at the domain zicocapsul.cyberia.club. You can find other examples of public Gancio servers at gancio.org/instances.

Accounts

Anyone at LZ can request an account for the LZ calendar; ask in person or on matrix in the #LZ-general room. If we know you we'll be happy to give you an account. This account allows a user to make new events. Admin accounts are more power and responsibility, so if you would like one, please ask in person at LZ.

Events

If you have an account and are logged in, you can add a new event directly. On the main page, click the + Add Event button and follow the form. It is possible to add a flyer/image to the event page and to have reoccurring events.

It is also possible to add events if you do not have an account! However, an admin has to review anonymously submitted events before they are published. If you've submitted an event wihtout an account and it hasn't been published for a few days, please ask about it in the #lz-general matrix channel (yes, sorry I know this destroys the anonymity of the submission).

Event Feed

Gancio not only publishes events on the fediverse as noted above, but also publishes an RSS feed and an iCal feed. Check calendar.layerze.ro/export for all the options.

Setup and Updates

zico originally set up Gancio as a nerd project to see if they could get it working on Alpine Linux. Alpine Linux packagers have not packaged gancio (this may be a future project; if you are interested in this please feel free to reach out to @zico:tent.matrix.passtheballsocrates.com on matrix) so currently zico is building a node-js tarball using yarn and Docker.

Build process

zico rebuilds Gancio for Alpine because of dependency versioning. Gancio uses an old version of the NodeJS module sharp for legacy processor support, but this older sharp version doesn't work with newer versions of NodeJS, and Alpine only ships the latest stable version of node. zico has detailed the build process in this Forgejo repo. Here is a basic summary in case the current setup stops working:

  1. Clone the repo: git clone git.cyberia.club/zico/gancio-patched on your own machine

  2. Use either Docker or Podman to build a node tarball (see repo for detailed instructions)

  3. Copy/move tarball from the /out directory to wherever you need it. For the LZ calendar, this is to calendar.layerze.ro

  4. To push changes to the upstream repo, copy the latest node tarball to gancio-patched-latest.tgz in the repo, then push it or make a PR

Installing

  1. Get the node tarball onto the server, either by copying it from wherever you built it or downloading the tarball from the repo (assuming you pushed the latest changes and included the latest tarball)

  2. If reinstalling gancio, stop the gancio service: rc-service gancio stop

  3. Install the software with yarn: yarn global add file:./gancio-$VERSION.tgz

  4. If installing to a fresh system, copy the initd-gancio script in the code to /etc/initd-gancio and make the service start at boot: rc-update add gancio default

  5. Start the gancio service: rc-service gancio start

Updating with the current working setup

  • Check the version of Alpine Linux (if you're updating the OS), the version of NodeJS it ships with (use this), and the latest version of sharp.

  • Update the Dockerfile in the cloned code in three places:

  1. Line 1: FROM node:[current latest alpine node version]-alpine

  2. Line 6: RUN - change the sharp version to the latest

  3. Line 6 again: RUN - change the node version to the current version Alpine ships

PODMAN
podman build --no-cache --format docker --build-arg=GANCIO_VER=[version] -t gancio-patched:[insert version here] .
podman run -v ./out:/out:Z gancio-patched:[version]

DOCKER
docker build --no-cache --build-arg GANCIO_VER=[version] -t=gancio-patched:[version] .
docker run -v ./out:/out gancio-patched:[version]
  • In the build repo, move /out/gancio-patched-[version].tgz to gancio-patched-latest.tgz.

  • Push the new build to the gancio-patched Forgejo repo (the update script downloads the tarball from this repo).

  • On the zicocapsul server, run /usr/local/bin/update-gancio.sh (or just update-gancio.sh). This downloads the tarball from the Forgejo repo, stops the gancio service, uninstalls and then reinstalls Gancio, and restarts the service.

  • Visit calendar.layerze.ro to make sure everything is working as it should

Questions

For questions or suggestions please contact zico.