Skip to content

N0T-BAD/BE-member

Repository files navigation

BE-member

멤버 서비스 입니다.

환경 변수

environment description
{GCP_BUCKETKEY_JSON} GCP bucket 등록을 위한 private key를 .json 형식으로 입력해주세요
{DB_MASTER_URL} MY SQL MASTER DB URL을 입력해주세요
{DB_SLAVE_URL} MY SQL SLAVE DB URL을 입력해주세요
{DB_USERNAME} MY SQL DB USERNAME을 입력해주세요
{DB_PASSWORD} MY SQL DB PASSWORD를 입력해주세요
{GCP_PROJECT_ID} GCP PROJECT ID를 입력해주세요
{EUREKA_DEFAULT_ZONE} EUREKA DEFAULT ZONE을 입력해주세요
{KAFKA_BOOTSTRAP_ADDRESS}} Kafka bootstrap 주소를 입력해주세요
{REDIS_HOST} REDIS HOST를 입력해주세요
{DOCKERHUB_USERNAME} DOCKERHUB 명을 입력해주세요
{DOCKERHUB_PASSWORD} DOCKERHUB 비밀번호를 입력해주세요
{VM_INSTANCE_HOST} VM 인스턴스 Host를 입력해주세요
{SSH_USERNAME} SSH USERNAME을 입력해주세요
{SSH_PRIVATE_KEY} SSH PRIVATE KEY를 입력해주세요
  • 환경 변수를 바탕으로 application.yml 파일을 생성합니다.
server:
  port: 8082

eureka:
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: ${eureka.client.service-url.defaultZone}

spring:
  application:
    name: member-service

  datasource:
    master:
      driver-class-name: com.mysql.cj.jdbc.Driver
      jdbc-url: ${spring.datasource.master.jdbc-url}
      username: ${spring.datasource.master.username}
      password: ${spring.datasource.master.password}
    slave:
      driver-class-name: com.mysql.cj.jdbc.Driver
      jdbc-url: ${spring.datasource.slave.jdbc-url}
      username: ${spring.datasource.slave.username}
      password: ${spring.datasource.slave.password}

  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MySQL8Dialect
        format_sql: true
    hibernate:
      ddl-auto: update
    show-sql: true

  servlet:
    multipart:
      max-file-size: 10MB
      max-request-size: 10MB

  cloud:
    openfeign:
      autoconfiguration:
        jackson:
          enabled: false
    gcp:
      credentials:
        location: classpath:gcpkey.json
      project-id: ${spring.gcp.storage.credentials.project-id}

  kafka:
    bootstrapAddress: ${spring.kafka.bootstrapAddress}
    interestTopic: interestCount
    ratingTopic: rating
    commentTopic: commentCount

  main:
    allow-bean-definition-overriding: true

  session:
    store-type: redis

  redis:
    host: host.docker.internal
    port: 6379

feign:
  hystrix:
    enabled: true
  client:
    config:
      default:
        logger-level: FULL
  httpclient:
    enabled: true
  • 위의 과정을 마치고 프로그램을 실행합니다.


About

멤버 서비스 입니다.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •