adding .env file
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -23,3 +23,6 @@ go.work
|
||||
|
||||
persistence
|
||||
.DS_Store
|
||||
|
||||
# env
|
||||
.env
|
||||
|
||||
12
Makefile
12
Makefile
@@ -1,11 +1,11 @@
|
||||
DB_HOST="10.99.0.3"
|
||||
DB_PORT="5432"
|
||||
DB_NAME="crowsnest_dev"
|
||||
DB_USER="crow_dev"
|
||||
DB_PASS="hL0VlXkH2WoHL7c7FdRTHXMy"
|
||||
# Load the .env file
|
||||
ifneq (,$(wildcard ./.env))
|
||||
include .env
|
||||
export $(shell sed 's/=.*//' .env)
|
||||
endif
|
||||
|
||||
go-run:
|
||||
cd src; DB_USER=$(DB_USER) DB_PASS=$(DB_PASS) DB_NAME=$(DB_NAME) DB_HOST=$(DB_HOST) go run cmd/frontend/main.go
|
||||
cd src; go run cmd/frontend/main.go;
|
||||
|
||||
migrate-up:
|
||||
goose -dir=./src/assets/migrations/ postgres "postgresql://$(DB_USER):$(DB_PASS)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)" up
|
||||
|
||||
Reference in New Issue
Block a user