[![Build Status](https://build.coopcloud.tech/api/badges/RTM/rtm-website/status.svg)](https://build.coopcloud.tech/RTM/rtm-website) # hello friends ! # To Run the Website Locally ### Prerequisites - [Node.js](https://nodejs.org/) version 18.17.1 or higher (we recommend using NVM to manage Node versions) - [pnpm](https://pnpm.io/) (optional but recommended) ### Step 1: Install correct Node.js version If you have NVM (Node Version Manager) installed: ```bash nvm install 18.17.1 nvm use 18.17.1 ``` Verify your Node.js version: ```bash node -v ``` ### Step 2: Install dependencies ```bash npm install ``` ### Step 3: Start the development server ```bash npx astro dev ``` ## Tech Stack - [Astro](https://astro.build/) - The core framework - [React](https://reactjs.org/) - For interactive components - [Tailwind CSS](https://tailwindcss.com/) - For styling (find docs [here](https://tailwindcss.com/docs/installation/using-vite)) - [TypeScript](https://www.typescriptlang.org/) - For type safety # To release a new version ## Build the Docker image (this requires having [Docker](https://docs.docker.com/engine/install/) installed!) Set the version to the next [semantic version](https://semver.org/) after the version posted at [our co-op cloud's packages site](https://git.coopcloud.tech/RTM/-/packages) under "rtmwebsite": ``` bash version= # example: if the semantic version you see for "rtmwebsite" is 0.0.1, then put version=0.0.2 here since we want to deploy the next version docker build --platform linux/amd64 -t git.coopcloud.tech/rtm/rtmwebsite:$version . ``` ## Push the image to gitea registery Check out [this documentation](https://docs.gitea.com/next/usage/packages/container) for how to login with gitea registery. ``` bash # If not in the same terminal session, rerun `version=...` line from last step docker push git.coopcloud.tech/rtm/rtmwebsite:$version ``` At [our co-op cloud's packages site](https://git.coopcloud.tech/RTM/-/packages), click on "rtmwebsite" and check that the version mentioned is the version you specified! ## Update recipe ### One-time Setup We use a [private recipe](https://git.coopcloud.tech/RTM/rtm-astro-recipe) to deploy this website. This step needs Tailscale to be activated. Follow our [Fleet Setup and Access Instructions](https://nextcloud.resisttechmonopolies.online/apps/collectives/RTM-Reference-2/Fleet-Setup-and-access-12904) and get set up on Laylotta. The following examples will assume your name in Sootie's config is "blueberry"! You will need to have wget (`brew install wget` on mac) and [abra](https://docs.coopcloud.tech/abra/) installed. Create an SSH key to use with Sootie with the following command. Take note of the file where you save the key. The following examples will assume it is saved to `rtm` and that the `.ssh` directory is in your home directory (which you can find with the command `echo $HOME`). ```ssh-keygen -t ed25519``` Run the following commands to install the SSH key to Sootie as an authorized key: ``` ssh-copy-id -i $HOME/.ssh/rtm.pub blueberry@resisttechmonopolies.online ssh -i $HOME/.ssh/rtm 'blueberry@resisttechmonopolies.online' ``` In the `$HOME/.ssh/config` file (which you may have to create if it does not exist), paste the following: ``` Host resisttechmonopolies.online Hostname resisttechmonopolies.online User blueberry UseKeychain yes IdentityFile ~/.ssh/rtm ``` You should now be able to SSH into Sootie with just the command `ssh resisttechmonopolies.online` Run the following command (OUTSIDE of the terminal in which you ran ssh in the previous step) ```abra server add resisttechmonopolies.online``` Clone the `rtm-config` repo: ``` bash git clone https://git.coopcloud.tech/RTM/rtm-config.git ``` Clone the `rtm-astro-recipe` repo into your `$HOME/.abra/recipes` directory: ```git clone https://git.coopcloud.tech/RTM/rtm-astro-recipe.git``` ### Every time you deploy Make sure you are connected to Laylotta on Tailscale. Update the version number to the latest (the one that you pushed to the Gitea registry previously) in ``` bash rtm-config/abra/servers/laylotta.resisttechmonopolies.online/resisttechmonopolies.online.env ``` Then make sure you are in the rtm-config directory and run the following commands: ``` bash abra app undeploy resisttechmonopolies.online # verify that there is a 404 page at https://resisttechmonopolies.online/ abra app deploy resisttechmonopolies.online # verify that the new version is present at https://resisttechmonopolies.online/ ```