To execute a deployment for the LikeDAO system, please review the files in this folder and follow the instructions below.
- Set of deployment values
- Set of deployment config assets
- Permission to access/upload image to registry
- Connection details to database
For the likedao system to work we will have to setup the databases correctly, follow the instructions below to setup the server and bdjuno db
- Go to the main likedao repo and make sure the submodules are initialized
- In
bdjuno/bdjuno/database/schema
, there are multiple sql files. Run following to create a single sql.
ls | sed -l 's/^/\\i /;w all.sql'
cat <(echo 'CREATE SCHEMA IF NOT EXISTS "bdjuno";set search_path = "bdjuno";') all.sql > create.sql
- Run the
create.sql
using command like:psql --host 127.0.0.1 -U likedao-bdjuno -d likedao-bdjuno -f create.sql
- Login to the database
- Run the following sql to create a schema, this is because
golang bun
sets the default schema on connect
CREATE SCHEMA IF NOT EXISTS "likedao";
- The db should be automatically migrated when the server is deployed
Decide which version you would like to deploy, specific via buildTag
or checkout specific version and build the docker images yourself.
- Duplicate the content in values template and create one that fits the deployment environment
- Run
make -C deploy deploy NAMESPACE=${NAMESPACE} VALUES=${PATH_TO_VALUES}