Skip to content

Commit

Permalink
Merge pull request #29 from 9oormthon-univ/chore/#28
Browse files Browse the repository at this point in the history
✨ 환경변수 및 Docker 배포 설정
  • Loading branch information
GiHwan2 authored Nov 22, 2024
2 parents 2af7fd0 + dd7dda8 commit 4de373d
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
45 changes: 45 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
services:
backend:
image: sandwich5011/ivory-backend
ports:
- "8080:8080"
environment:
DB_URL: ${DB_URL}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
ACCESS_KEY: ${ACCESS_KEY}
SECRET_KEY: ${SECRET_KEY}
OCR_API_SECRET: ${OCR_API_SECRET}
OCR_API_URL: ${OCR_API_URL}
OCR_TEMPLATE_IDS: ${OCR_TEMPLATE_IDS}
KAKAOPAY_SECRET_KEY: ${KAKAOPAY_SECRET_KEY}
CID: ${CID}

SPRING_PROFILES_ACTIVE: prod
depends_on:
db:
condition: service_healthy
networks:
- app-network

db:
image: mysql:8.0
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
healthcheck:
test: ["CMD", "mysqladmin", "ping"]
interval: 5s
timeout: 10s
retries: 40
networks:
- app-network

networks:
app-network:
driver: bridge
5 changes: 1 addition & 4 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ logging:
SQL: debug
type: trace
com:
ivory.ivory: debug

jwt:
secret: ${JWT_SECRET}
ivory.ivory: debug
21 changes: 20 additions & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,23 @@ spring:
datasource:
url: ${DB_URL}
username: ${MYSQL_USER}
password: ${MYSQL_PASSWORD}
password: ${MYSQL_PASSWORD}
jpa:
hibernate:
ddl-auto: none
show-sql: false
properties:
hibernate:
format_sql: false
use_sql_comments: false
sql:
init:
mode: never
logging:
level:
org:
hibernate:
SQL: error
type: error
com:
ivory.ivory: info
3 changes: 3 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ ocr:
kakaopay:
secretKey: ${KAKAOPAY_SECRET_KEY}
cid: ${CID}

jwt:
secret: ${JWT_SECRET}

0 comments on commit 4de373d

Please sign in to comment.