Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
title목차

Table of Contents

application.properties

  • Docker Container화를 하면 Redis는 다른 Container에 존재하므로, host와 port를 명시해야 합니다.
Code Block
titlesrc/main/resources/application.properties
## Redis 설정을 추가 합니다.
[root@workspace-vm my-reactive-link-shortener-sample-app]# cat src/main/resources/application.properties 
## host 와 port를 추가 합니다.
spring.redis.host=redis
spring.redis.port=6379

Dockerfile

Code Block
titleDockerfile
FROM maven:3.5-jdk-8 AS build
WORKDIR /usr/app
COPY . /usr/app
RUN mvn clean package -Dmaven.test.skip=true

FROM openjdk:8-jdk-alpine
COPY --from=build /usr/app/target/*.jar /app.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/app.jar"]

...