- Start with creating a server with the latest version of Debian (at the time of writing, this is Debian 10)
- When you have your server running, update your repository data and install
git,software-properties-commonandnodejs:apt update && apt install git software-properties-common nodejs gnupg2 curl -y - Add the docker repo and install
docker-ce. (instructions) - Add the yarn repo and install
yarn. (instructions) - Create a limited user for setting up the Docker container and add it to the
dockeruser group:adduser --gecos '' --disabled-password cryb && \ usermod -aG docker cryb
- Switch to the
crybuser:su - cryb
- Continue by cloning the @crybapp/portal repo:
git clone https://github.com/crybapp/portal.git
- Copy
.env.exampleover to.envand set it up so the VM can communicate with your API and aperture servers - Run
yarnandyarn docker:buildin the portal folder - Once the build succeeds, create a
start.shshell script in your home directory and insert the following code inside it:SHM_SIZE="1gb" cd /home/cryb/portal && docker run --rm -i --net=bridge --shm-size="$SHM_SIZE" cryb/portal
- Make the shell script executable:
chmod +x ~/start.sh
- Create a crontab entry using
crontab -eand insert the following:@reboot /home/cryb/start.sh
- Power off the VM and take an image of it.
- Get your image/snapshot ID from the Hetzner Cloud console or via the API. You can do this via the Hetzner Cloud API or by going to the Network tab of your browser, editing your image in any way (adding a tag, protecting it, etc...) and checking the URL of the API request the website made.
- Replace the image ID in
portals/.envwith your own image ID.
- Power off the VM and take a snapshot of it.
- Get your snapshot ID. You can do this via the the DigitalCloud API, or using the dashboard: once the snapshot is completed, click on the "More" dropdown menu and click "Create Droplet". Once the droplet creation page has loaded, you should be able to get the image ID from the
&imageId=parameter from the URL in your browser's URL bar. - Make sure the region your snapshot is in is the same as the region you set in
portals/.env. If it isn't, transfer the image to the specified region or change the region you set inportals/.env. - Replace the image ID in
portals/.envwith your own image ID.