-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: flyway 추가 * refactor: 환경 변수로 값 지정할 수 있게 yml 변경 * build: CD에서 jar로 이미지 만들 수 있게 도커파일 추가 * refactor: 직접 참조 간접 참조로 변경 * refactor: 매 정각, 30분 마다 api 호출하도록 변경
- Loading branch information
Showing
10 changed files
with
193 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM amazoncorretto:17-alpine | ||
|
||
COPY build/libs/parking-0.0.1-SNAPSHOT.jar app.jar | ||
|
||
CMD ["java", "-jar", "app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
spring: | ||
# JPA | ||
jpa: | ||
hibernate: | ||
ddl-auto: create | ||
show-sql: true | ||
properties: | ||
hibernate: | ||
format_sql: true | ||
flyway: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
spring: | ||
# JPA | ||
jpa: | ||
hibernate: | ||
ddl-auto: validate | ||
database: mysql | ||
open-in-view: false | ||
|
||
# DB | ||
datasource: | ||
url: ${DB_URL} | ||
username: ${DB_USERNAME} | ||
password: ${DB_PASSWORD} | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
# flyway | ||
flyway: | ||
enabled: true | ||
url: ${DB_URL} | ||
user: ${DB_USERNAME} | ||
password: ${DB_PASSWORD} | ||
baseline-on-migrate: true | ||
locations: classpath:db/migration/mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,31 @@ | ||
spring: | ||
jpa: | ||
hibernate: | ||
ddl-auto: create | ||
show-sql: true | ||
properties: | ||
hibernate: | ||
format_sql: true | ||
profiles: | ||
active: ${PROFILE:dev} | ||
mail: | ||
host: smtp.gmail.com | ||
port: 587 | ||
username: everythinginparking3@gmail.com | ||
password: test | ||
host: ${MAIL_HOST:smtp.gmail.com} | ||
port: ${MAIL_PORT:587} | ||
username: ${MAIL_USERNAME:mail@gmail.com} | ||
password: ${MAIL_PASSWORD:password} | ||
properties: | ||
mail: | ||
smtp: | ||
auth: true | ||
timeout: 5000 | ||
starttls: | ||
enable: true | ||
# redis | ||
# REDIS | ||
data: | ||
redis: | ||
host: localhost | ||
port: 6379 | ||
|
||
# file | ||
file: | ||
dir: src/test/resources/static/images/ | ||
host: ${REDIS_HOST:localhost} | ||
port: ${REDIS_PORT:6379} | ||
|
||
# authcode | ||
# AUTH CODE | ||
authcode: | ||
expired-time: 300 | ||
|
||
|
||
# key | ||
# API KEY | ||
kakao: | ||
key: test | ||
seoul-public-parking-key: test | ||
pusan-public-parking-key: test | ||
key: ${KAKAO_API_KEY:kakao} | ||
seoul-public-parking-key: ${SEOUL_API_KEY:seoul} | ||
pusan-public-parking-key: ${PUSAN_API_KEY:pusan} |
88 changes: 88 additions & 0 deletions
88
src/main/resources/db/migration/mysql/V1.0.0__initial_schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
-- favorite 테이블 생성 | ||
CREATE TABLE favorite ( | ||
id BIGINT NOT NULL AUTO_INCREMENT, | ||
created_at TIMESTAMP, | ||
updated_at TIMESTAMP, | ||
member_id BIGINT, | ||
parking_id BIGINT, | ||
PRIMARY KEY (id), | ||
UNIQUE (member_id, parking_id) | ||
); | ||
|
||
-- member 테이블 생성 | ||
CREATE TABLE member ( | ||
id BIGINT NOT NULL AUTO_INCREMENT, | ||
deleted BOOLEAN, | ||
email VARCHAR(255) UNIQUE, | ||
name VARCHAR(255), | ||
nickname VARCHAR(255), | ||
password VARCHAR(255), | ||
PRIMARY KEY (id) | ||
); | ||
|
||
-- member_session 테이블 생성 | ||
CREATE TABLE member_session ( | ||
session_id VARCHAR(255) NOT NULL, | ||
created_at TIMESTAMP, | ||
expired_at TIMESTAMP, | ||
member_id BIGINT, | ||
PRIMARY KEY (session_id) | ||
); | ||
|
||
-- parking 테이블 생성 | ||
CREATE TABLE parking ( | ||
id BIGINT NOT NULL AUTO_INCREMENT, | ||
created_at TIMESTAMP, | ||
updated_at TIMESTAMP, | ||
base_fee INTEGER, | ||
base_time_unit INTEGER, | ||
capacity INTEGER, | ||
current_parking INTEGER, | ||
day_maximum_fee INTEGER, | ||
extra_fee INTEGER, | ||
extra_time_unit INTEGER, | ||
holiday_begin_time TIME, | ||
holiday_end_time TIME, | ||
holiday_free_begin_time TIME, | ||
holiday_free_end_time TIME, | ||
latitude FLOAT NOT NULL, | ||
longitude FLOAT NOT NULL, | ||
saturday_begin_time TIME, | ||
saturday_end_time TIME, | ||
saturday_free_begin_time TIME, | ||
saturday_free_end_time TIME, | ||
weekday_begin_time TIME, | ||
weekday_end_time TIME, | ||
weekday_free_begin_time TIME, | ||
weekday_free_end_time TIME, | ||
address VARCHAR(255), | ||
description VARCHAR(255), | ||
name VARCHAR(255), | ||
operation_type ENUM ('PUBLIC', 'PRIVATE', 'NO_INFO'), | ||
parking_type ENUM ('OFF_STREET', 'ON_STREET', 'MECHANICAL', 'NO_INFO'), | ||
tel VARCHAR(255), | ||
PRIMARY KEY (id) | ||
); | ||
|
||
-- review 테이블 생성 | ||
CREATE TABLE review ( | ||
id BIGINT NOT NULL AUTO_INCREMENT, | ||
created_at TIMESTAMP, | ||
parking_id BIGINT, | ||
reviewer_id BIGINT, | ||
contents VARCHAR(255), | ||
PRIMARY KEY (id) | ||
); | ||
|
||
-- search_condition 테이블 생성 | ||
CREATE TABLE search_condition ( | ||
id BIGINT NOT NULL AUTO_INCREMENT, | ||
hours INTEGER NOT NULL, | ||
member_id BIGINT, | ||
fee_types VARCHAR(255), | ||
operation_types VARCHAR(255), | ||
parking_types VARCHAR(255), | ||
pay_types VARCHAR(255), | ||
priority ENUM ('DISTANCE', 'PRICE', 'RECOMMENDATION'), | ||
PRIMARY KEY (id) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters