Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# All variables must be defined in your local system
############################################
# Task Scheduler - Task Scheduler module
# Required Environment Variables
#
# Note: use double quotes only if the value contains spaces or starts with '#'.
############################################

# Used locally and in Docker environments
TS_JWT_SECRET="your-secret-key"
# Secret key used to sign and verify JWT tokens
TS_JWT_SECRET=your-secret-key
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "user", url = "${ts.user.service.url}")
@FeignClient(name = "user", url = "${ts.user.service.uri}")
public interface UserClient {

@GetMapping("/user")
@GetMapping
UserDTO getUserByEmail(@RequestParam("email") String email, @RequestHeader("Authorization") String token);
}
7 changes: 4 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ server.port=8081

spring.data.mongodb.database=ts_task_scheduler

# Env variables set by bff's docker-compose and used in Docker environment only. Default (localhost) used otherwise
# If environment variables are not defined, localhost defaults will be used (currently, these env vars are only set by
# the System repo's docker compose to run the application in Docker)
spring.data.mongodb.uri=${SPRING_DATA_MONGODB_URI:mongodb://localhost:27017/ts_task_scheduler}
ts.user.service.url=${TS_USER_SERVICE_URL:localhost:8080}
ts.user.service.uri=${TS_USER_SERVICE_URI:http://localhost:8080/user}

# Must be set locally - used locally and in docker environment (injected in bff's docker-compose)
# Secret key used to sign and verify JWT tokens (injected via environment variables)
ts.jwt.secret=${TS_JWT_SECRET}