Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env: dev 전용 환경 설정 #71

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions backend/docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

services:
mysql:
container_name: zipgo
image: mysql/mysql-server:5.7
environment:
MYSQL_DATABASE: zipgo-mysql
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: root
TZ: 'Asia/Seoul'
ports:
- 13306:3306
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"

30 changes: 30 additions & 0 deletions backend/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# database
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${JDBC_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}

---
# jpa
spring:
jpa:
database: mysql
database-platform: org.hibernate.dialect.MySQL57Dialect
generate-ddl: true
hibernate:
ddl-auto: create
properties:
hibernate:
format_sql: true
show_sql: true
open-in-view: false
defer-datasource-initialization: true

sql:
init:
mode: never

---
22 changes: 20 additions & 2 deletions backend/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
---
# database
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${JDBC_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}

---
# jpa
spring:
jpa:
database-platform: org.hibernate.dialect.MySQLDialect
show-sql: true
database: mysql
database-platform: org.hibernate.dialect.MySQL57Dialect
generate-ddl: true
hibernate:
ddl-auto: none
properties:
hibernate:
format_sql: true
show_sql: true
open-in-view: false

---
# log
logging:
level:
org.hibernate.SQL: error
org.hibernate.type: error
12 changes: 0 additions & 12 deletions backend/src/main/resources/application-rosie.yml

This file was deleted.

11 changes: 3 additions & 8 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver

---

# application
spring:
config:
active:
on-profile: rosie
profiles:
active: dev