Skip to content

Commit

Permalink
🐛 chore: reduce env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
perebaj committed Sep 29, 2023
1 parent 5fec510 commit 6d5c5de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Jamming around orders with API endpoints 🎸
CONTRACTUS_POSTGRES_URL
CONTRACTUS_GOOGLE_CLIENT_ID
CONTRACTUS_GOOGLE_CLIENT_SECRET
CONTRACTUS_GOOGLE_REDIRECT_URL
CONTRACTUS_DOMAIN
CONTRACTUS_JWT_SECRET_KEY

## Get Started
Expand Down
4 changes: 2 additions & 2 deletions cmd/contractus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func main() {
Auth: api.Auth{
ClientID: os.Getenv("CONTRACTUS_GOOGLE_CLIENT_ID"),
ClientSecret: os.Getenv("CONTRACTUS_GOOGLE_CLIENT_SECRET"),
RedirectURL: os.Getenv("CONTRACTUS_GOOGLE_REDIRECT_URL"),
Domain: getEnvWithDefault("CONTRACTUS_DOMAIN", "http://localhost:8080"),
Domain: os.Getenv("CONTRACTUS_DOMAIN"), // Example: http://localhost:8080
RedirectURL: os.Getenv("CONTRACTUS_DOMAIN") + "/callback",
JWTSecretKey: os.Getenv("CONTRACTUS_JWT_SECRET_KEY"),
AccessType: getEnvWithDefault("CONTRACTUS_ACCESS_TYPE", "online"),
},
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
GOLANGCI_LINT_VERSION: ${GOLANGCI_LINT_VERSION}
environment:
CONTRACTUS_POSTGRES_URL: postgres://postgres:postgres@postgres:5432/contractus?sslmode=disable
CONTRACTUS_GOOGLE_REDIRECT_URL: http://localhost:8080/callback
CONTRACTUS_DOMAIN: http://localhost:8080
CONTRACTUS_JWT_SECRET_KEY: secret
CONTRACTUS_ACCESS_TYPE: offline
volumes:
Expand Down

0 comments on commit 6d5c5de

Please sign in to comment.