diff --git a/README.md b/README.md index 96640b7..cf752eb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cmd/contractus/main.go b/cmd/contractus/main.go index ab72cf8..1f7fb42 100644 --- a/cmd/contractus/main.go +++ b/cmd/contractus/main.go @@ -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"), }, diff --git a/docker-compose.yaml b/docker-compose.yaml index 5449c06..16a60e7 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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: