[![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 in the docker image (make sure you have Docker 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= 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 We use a [private recipe](https://git.coopcloud.tech/RTM/rtm-astro-recipe) to deploy this website. This step needs Wireguard to be activated (download Wireguard ask Sootie's owner to create a config for you and give you Docker permissions). 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 within `Users/blueberrys-machine/`. ```ssh-keygen -t ed25519``` Run the following commands to install the SSH key to Sootie as an authorized key: ``` ssh-copy-id -i Users/blueberrys-machine/.ssh/rtm.pub blueberry@resisttechmonopolies.online ssh -i Users/blueberrys-machine/.ssh/rtm 'blueberry@resisttechmonopolies.online' ``` In the `Users/blueberrys-machine/.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-astro-recipe repo into your `~/.abra/recipes` directory: ```git clone https://git.coopcloud.tech/RTM/rtm-astro-recipe.git``` Update the version number to the latest in ``` bash .abra/servers/resisttechmonopolies.online/resisttechmonopolies.online.env ``` Then ``` bash abra app undeploy resisttechmonopolies.online # wait 10 seconds abra app deploy resisttechmonopolies.online ```