웹툰 서비스 입니다
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 주소를 입력해주세요 |
{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: 8084
eureka:
client:
register-with-eureka: true
fetch-registry: true
service-url:
defaultZone: ${eureka.client.service-url.defaultZone}
spring:
application:
name: webtoon-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}
kafka:
bootstrapAddress: ${spring.kafka.bootstrapAddress}
viewTopic: viewCount
interestTopic: interestCount
ratingTopic: rating
viewGroup: viewCountGroup
interestGroup: interestCountGroup
ratingGroup: ratingGroup
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL8Dialect
format_sql: true
hibernate:
ddl-auto: update
show-sql: true
cloud:
gcp:
storage:
credentials:
location: classpath:gcpkey.json
project-id: ${spring.cloud.gcp.storage.credentials.project.id}
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
- 위의 과정을 마치고 프로그램을 실행합니다.