Install the dependencies:
$ go mod tidy
$ bun installInstall golang migrate cli tool:
$ cd ~/Downloads
$ curl -L https://github.com/golang-migrate/migrate/releases/download/v4.18.3/migrate.linux-amd64.tar.gz | tar xvz
$ mv migrate $GOPATH/bin/migrate
$ migrate -versionCreate the .env file and fill in the values:
$ cp .env.example .envGenerate sqlc files:
$ make db/sqlcStart docker compose:
$ docker compose -f development/docker-compose.yaml up -dRun migrations on the development database:
$ make db/dev/migrate
$ make db/dev/migrate/downGenerate mock files for testing:
make test/generateRun the dev target with make:
$ make devTo attach to the postgres container:
$ docker exec -it development-db shBuild docker image for production:
$ docker build -t nand2tetris_web:latest -f ./build/package/Dockerfile .Run migrations on the production database:
$ docker run --rm bauerbrun0/nand2tetris_web:latest -migrate -dsn=postgres://nand2tetris_web_migration:<PASSWORD>@<HOST>/nand2tetris_web