You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install all required dependencies to run backend/frontend/db, check our dockerfiles for reference on what to install.
We would like Postgresql 12.11 and Node 14.5.5 as we would like a DB service and a place for our Node (Graphql) backend service to run with versions as similar to our development environment as possible. For your information, we use the docker images node:14.15.5-slim for our local backend container and postgres:12-alpine for our db container.
Action: create bash script to install all dependencies
To make this closest to prod as possible, we want to deploy just backend and db in vps, frontend on firebase hosting
wget -nv -O - https://get.docker.com/ | sh
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | sudo apt-key add -
export SOURCE="https://packagecloud.io/dokku/dokku/ubuntu/"
export OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
echo "bionic focal" | grep -q "$OS_ID" || OS_ID="bionic"
echo "deb $SOURCE $OS_ID main" | sudo tee /etc/apt/sources.list.d/dokku.list
sudo apt-get update
sudo apt-get install dokku
sudo dokku plugin:install-dependencies --core
# you can use any domain you already have access to
# this domain should have an A record or CNAME pointing at your server's IP
dokku domains:set-global sisteringapps.asurtec.com
# from your local machine
# SSH access to github must be enabled on this host
git clone https://github.com/uwblueprint/sistering
# on the Dokku host
dokku apps:create sistering-prod
# on the Dokku host
# install the postgres plugin
# plugin installation requires root, hence the user change
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
# create a postgres service with the name sisteringdatabase
dokku postgres:create sisteringdatabase
# on the Dokku host
# each official datastore offers a `link` method to link a service to any application
dokku postgres:link sisteringdatabase sistering-prod
dokku config:set --no-restart sistering-prod ENV1=val1 ENV2=val2 ....
# from your local machine
# the remote username *must* be dokku or pushes will fail
cd sistering
git remote add dokku [email protected]:sistering-prod
cat ~/.ssh/id_rsa.pub | ssh [email protected] sudo dokku ssh-keys:add admin
git push dokku `git subtree split --prefix backend`:master --force
The text was updated successfully, but these errors were encountered:
Install all required dependencies to run backend/frontend/db, check our dockerfiles for reference on what to install.
We would like Postgresql 12.11 and Node 14.5.5 as we would like a DB service and a place for our Node (Graphql) backend service to run with versions as similar to our development environment as possible. For your information, we use the docker images node:14.15.5-slim for our local backend container and postgres:12-alpine for our db container.
Action: create bash script to install all dependencies
Docker images:
https://github.com/nodejs/docker-node/blob/main/14/buster-slim/Dockerfile#L20
https://github.com/docker-library/postgres/blob/master/12/alpine/Dockerfile
initial server setup guide: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-20-04 might help.
For an Apache webserver server, which would be a guide like this: https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-20-04.
The flow of the bash script
We want to setup dokku on the machine and run all the required containers in the VM: https://dokku.com/docs/getting-started/installation/
To make this closest to prod as possible, we want to deploy just backend and db in vps, frontend on firebase hosting
The text was updated successfully, but these errors were encountered: