Skip to content

Deploying

NotAProton edited this page Mar 16, 2022 · 1 revision

If deploying on server follow the prerequisites and step one of https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04 and then follow the steps to deploy locally on the remote server using ssh

To deploy locally:

Download the compose yml, .env and sql script files

curl -L -O -J https://raw.githubusercontent.com/FastForwardTeam/Server/main/dist/docker-compose.yml

curl -L -O -J https://raw.githubusercontent.com/FastForwardTeam/Server/main/dist/.env

mkdir config &&  cd config && mkdir sql-scripts && cd sql-scripts

curl -L -O -J https://raw.githubusercontent.com/FastForwardTeam/Server/main/config/sql-scripts/init.sql

cd ../..

Generate 2048 bit RSA Keys

openssl genrsa -out private.pem 2048

openssl rsa -in private.pem -outform PEM -pubout -out public.pem

Load them as env variables

export pubPEM=`cat ./public.pem`

export privPEM=`cat ./private.pem`

chmod 400 private.pem public.pem

Complete configuration using .env file

nano .env

Run it

docker network create web
docker-compose up