-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from deepredk/feature/13
redis & mysql docker-compose.yml 작성
- Loading branch information
Showing
7 changed files
with
59 additions
and
14 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,17 @@ | ||
version: '3' | ||
services: | ||
mysql: | ||
image: mysql:latest | ||
container_name: mysql-container | ||
ports: | ||
- "3307:3306" | ||
environment: | ||
MYSQL_ROOT_PASSWORD: "1234" | ||
volumes: | ||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql | ||
|
||
redis: | ||
image: redis:latest | ||
container_name: redis-container | ||
ports: | ||
- "6380:6379" |
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,18 @@ | ||
-- hittracker 데이터베이스 생성 | ||
CREATE DATABASE IF NOT EXISTS hittracker; | ||
USE hittracker; | ||
|
||
-- Url 테이블 생성 | ||
CREATE TABLE IF NOT EXISTS Url ( | ||
url_id BIGINT AUTO_INCREMENT PRIMARY KEY, | ||
url VARCHAR(255) NOT NULL UNIQUE | ||
); | ||
|
||
-- DailyHitLog 테이블 생성 | ||
CREATE TABLE IF NOT EXISTS DailyHitLog ( | ||
id BIGINT AUTO_INCREMENT PRIMARY KEY, | ||
date DATE NOT NULL, | ||
dailyHit INT NOT NULL, | ||
url_id BIGINT NOT NULL, | ||
FOREIGN KEY (url_id) REFERENCES Url(url_id) ON DELETE CASCADE | ||
); |
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
spring: | ||
datasource: | ||
driver-class-name: org.h2.Driver | ||
url: jdbc:h2:mem:testdb | ||
username: sa | ||
password: | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
url: jdbc:mysql://localhost:3307/hittracker | ||
username: root | ||
password: 1234 | ||
h2: | ||
console: | ||
enabled: true | ||
jpa: | ||
hibernate: | ||
ddl-auto: update | ||
ddl-auto: update | ||
data: | ||
redis: | ||
port: 6380 |
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,9 @@ | ||
spring: | ||
datasource: | ||
driver-class-name: org.h2.Driver | ||
url: jdbc:h2:mem:testdb | ||
username: sa | ||
password: | ||
data: | ||
redis: | ||
port: 6380 |