This commit is contained in:
parent
c679ac24c6
commit
a1d55fb1ca
3 changed files with 10 additions and 0 deletions
|
@ -16,6 +16,9 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: silly-game
|
- name: silly-game
|
||||||
image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/michals-silly-game-backend:main
|
image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/michals-silly-game-backend:main
|
||||||
|
env:
|
||||||
|
- name: DOMAIN
|
||||||
|
value: "{{{ .Env.DOMAIN }}}"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package de.telekom.silly_game;
|
package de.telekom.silly_game;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -17,8 +18,12 @@ public class GameController {
|
||||||
|
|
||||||
private AtomicInteger jumpCount = new AtomicInteger(0);
|
private AtomicInteger jumpCount = new AtomicInteger(0);
|
||||||
|
|
||||||
|
@Value("${domain}")
|
||||||
|
private String domain;
|
||||||
|
|
||||||
@GetMapping("/jump")
|
@GetMapping("/jump")
|
||||||
public Map<String, Integer> registerJump() {
|
public Map<String, Integer> registerJump() {
|
||||||
|
System.out.println(domain);
|
||||||
int total = jumpCount.incrementAndGet();
|
int total = jumpCount.incrementAndGet();
|
||||||
total = total/2;
|
total = total/2;
|
||||||
System.out.println(total);
|
System.out.println(total);
|
||||||
|
|
|
@ -9,4 +9,6 @@ spring.mail.properties.mail.smtp.starttls.enable=false
|
||||||
|
|
||||||
cors.allowed-origin=*
|
cors.allowed-origin=*
|
||||||
|
|
||||||
|
domain=${DOMAIN}
|
||||||
|
|
||||||
server.servlet.context-path=/silly-game-api
|
server.servlet.context-path=/silly-game-api
|
Loading…
Reference in a new issue