These steps are not for completely setting up all dev steps. For that, checkout the main README for specific steps in setting up the environment once all tools are installed from this guide.
A very important note: WSL will experience significant performance degradation if the clone of the repository is outside of the WSL environment. So make sure to clone the repo within WSL (i.e., anywhere outside of the /mnt directory).
-
Install asdf (and all related asdf plugins for this project).
-
Install all the necessary tools using either
make install_asdf_tools
orasdf install
. Some of these are repeated inmake install_dev_tools
.- Install
build-essential
for C compiler (or choose your preferred C compiler) andlibedit-dev
for Python installation. - You will likely need
readline
. Installlibreadline-dev
. - You will likely need
zlib
. Installzlib1g-dev
. - You will likely need
crypto
. Installlibssl-dev
. - You will likely need
uuid
. Installuuid-dev
. - You will likely need
xml2
. Installlibxml2-dev
. - When installing Python, you will likely need
tk
. Installtk-dev
. - When compiling Python for the pre-commit hook, you will need
sqlite3
. Installlibsqlite3-dev
. - To install all of them together using
apt
, run:sudo apt install build-essential libedit-dev zlib1g-dev libssl-dev uuid-dev libxml2-dev tk-dev libsqlite3-dev libreadline-dev
.
- Install
-
Install node modules in the root directory using
yarn
. -
Install node modules in the
/app
directory usingyarn
. -
Back in the root folder, you will likely have to create your own PostgreSQL user to connect to the database using your default credentials. To do this, log in using the
postgres
user with the command:psql -U postgres -d postgres
. Then, create a user with the same name as the user you are signed in as on your account using:create user <username> with superuser;
. -
If you are using
make
, usemake install_dev_tools
to download Sqitch and other database tools, as well as install requirements for pre-commit. If there are failures here, sourcing~/.bashrc
should help resolve this. Otherwise, if you're not usingmake
, manually install pgtap and Sqitch.- The
install_perl_tools
step may fail or give off a warning such asCan't write to /usr/local/share/perl/5.34.0 and /usr/local/bin
. Following that, it will provide a command to solve that issue (cpanm --local-lib...
). If Sqitch fails to install, this command is likely to fix it.
- The
-
Install Git hooks for running Prettier and other pre-commit hooks by using
make install_git_hooks
or runningpre-commit install
. -
Using Sqitch, you can deploy all database changes by changing the directory to
/db
and running the commandsqitch deploy
(after creating the databaseccbc
). Alternatively, you can runmake deploy_dev_data
to deploy all changes and seed the database with some data.- Sometimes sqitch has an issue with connecting to your instance of postgres with sqitch (or yarn). For this, the simplest solution is to find your
pg_hba.conf
file (if you're using asdf, it will be where you installed asdf with a path like.asdf/installs/postgres/14.1/data/pg_hba.conf
) and change thelocal
method totrust
so you don't need to authenticate when connecting to your local instance
- Sometimes sqitch has an issue with connecting to your instance of postgres with sqitch (or yarn). For this, the simplest solution is to find your