Skip to content

bauerbrun0/nand2tetris-web

Repository files navigation

nand2tetris-web

Development

Install the dependencies:

$ go mod tidy
$ bun install

Install 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 -version

Create the .env file and fill in the values:

$ cp .env.example .env

Generate sqlc files:

$ make db/sqlc

Start docker compose:

$ docker compose -f development/docker-compose.yaml up -d

Run migrations on the development database:

$ make db/dev/migrate
$ make db/dev/migrate/down

Generate mock files for testing:

make test/generate

Run the dev target with make:

$ make dev

To attach to the postgres container:

$ docker exec -it development-db sh

Production

Build 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors