Skip to content
Snippets Groups Projects
Commit 5622de9e authored by Karel Zanáška's avatar Karel Zanáška
Browse files

Merge branch 'kz/add-eureka' into 'main'

Add eureka

See merge request !1
parents 4e71285a fc5bcb8f
No related branches found
No related tags found
1 merge request!1Add eureka
Pipeline #94933 passed
stages:
- build
variables:
DOCKER_HUB_IMAGE: $BOOKMAKER_SERVICE_REPOSITORY
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DOCKER_BUILDKIT: 1
DOCKER_HOST: "tcp://docker:2375"
before_script:
- docker info
- echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin || (echo "Docker login failed"; exit 1)
build:
stage: build
image: docker:20-dind
services:
- name: docker:20-dind
command: ["--tls=false"]
script:
- echo "Building Docker image..."
- docker build -t $DOCKER_HUB_IMAGE:$CI_COMMIT_SHORT_SHA -f Dockerfile .
- echo "Pushing Docker image..."
- docker push $DOCKER_HUB_IMAGE:$CI_COMMIT_SHORT_SHA || (echo "Docker push failed"; exit 1)
# after_script:
# - docker system prune -f
variables:
DOCKER_HOST: "tcp://docker:2375"
# DOCKER_HOST: tcp://127.0.0.1:2375
# DOCKER_HOST: tcp://0.0.0.0:2375
......@@ -22,6 +22,12 @@
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
......
spring:
application:
name: bookmaker-service
bookmaker:
user-service:
url: http://localhost:8081
odds-service:
url: http://localhost:8082
\ No newline at end of file
url: http://localhost:8082
eureka:
client:
serviceUrl:
defaultZone: http://service-discovery:8761/eureka/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment