- Go 1.16+
- MySQL
- redis download link
- air (for live reload) installation link
- Install
go install -tags 'mysql' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
- Create Migrations
migrate create -ext sql -dir ./migrations <MIGRATION_NAME>
- Up Migrations
migrate -path "./migrations" -database "mysql://root:YOUR_MYSQL_PASSWORD@/utopia" up
- Down Migrations
migarte -path "./migrations" -database "mysql://root:YOUR_MYSQL_PASSWORD@/utopia" down
-
Run
cp .sample.env .env
, fill the env variables -
Run
cp dauth.config.example.json dauth.config.json
, fill the required creds -
start server
-
development
air
-
production
go run main.go
-
- Install docker and docker-compose
- Run
cp .docker.sample.env .docker.env
, fill the env varaiables - Run
docker-compose up
to start the services