just
- prints all commands.just switch <branch>
- fetches from origin and switches to requested branch.just pull-master
- switches to master branch and pulls from origin.just push-branch
- pushes to the origin with--set-upstream origin HEAD
arg.just lint
- runs linters.just sql
- runs psql.just migrations-up
- run migration scripts.just migrations-down
- rollback migrations scripts.just prepare-dev
- runs Postgres container with Docker Compose.just run-dev
- runsair
.just build-snapshot
- builds snapshot version.just changelog
- updates changelog usingcliff
and commits the changes.
This project uses docker compose.yml
profiles to set up required dependencies.
There are 3 profiles defined: dev
, simple-prod
and migration
.
Use profile dev
to set up just a Postgres database. The application will use default DSN to connect to it.
A short note on profile simple-prod
- it will set up a containerized application with Postgres database.
Running the project:
- Run database migration scripts:
docker compose --profile migration run migration
- Run project in dev mode:
docker compose --profile dev up --detach
- Run project in simple-prod mode:
docker compose --profile simple-prod up --detach
REDIRECT_ENVIRONMENT = "development"
REDIRECT_API_SECRET_KEY = ""
REDIRECT_ENABLE_RATELIMITER = "false"
REDIRECT_DB_DSN = "postgres://postgres:[email protected]/redirect?sslmode=disable"
REDIRECT_DB_MAX_OPEN_CONNECTIONS = 25
REDIRECT_DB_MAX_IDLE_CONNECTIONS = 25
REDIRECT_DB_MAX_IDLE_TIME = "15m"
REDIRECT_LISTEN_ADDRESS = "0.0.0.0"
REDIRECT_LISTEN_PORT = 4000