- run
docker-compose up --detach --build
to spin up the postgres db
- run
docker ps
and grab thecontainer_id
of the postgres - attach a shell on that container by running
docker exec -it <container_id> bash
- connect to postgres by running
psql -h localhost -p 5432 -U postgres
and the password ispostgres
- the backend api service is connected to port
3000
- postgres is connected to the default port
5432
-
run
npm install
to install the dependencies -
run
npm run migrate:up
to create the database tables -
run
npm run prod
to transpile and start the api server