-
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.
feat: 로컬 DB 세팅 및 mikro-orm CLI 세팅, cache 도메인 구현 (#69)
- Loading branch information
Showing
11 changed files
with
837 additions
and
412 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,10 @@ | ||
# Database | ||
DATABASE_HOST=localhost | ||
DATABASE_PORT=3306 | ||
DATABASE_USER=root | ||
DATABASE_PASSWORD=test | ||
DATABASE_NAME=khlug | ||
|
||
# Authentication | ||
APP_KEY=appKeySecret | ||
SESSION_STORAGE_PATH= |
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 @@ | ||
CREATE DATABASE IF NOT EXISTS khlug; |
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,7 +1,34 @@ | ||
version: '3.8' | ||
|
||
services: | ||
mysql: | ||
image: mysql:8.0 | ||
container_name: mysql | ||
ports: | ||
- 3306:3306 | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=test | ||
command: | ||
- --character-set-server=utf8mb4 | ||
- --collation-server=utf8mb4_unicode_ci | ||
volumes: | ||
- ./.mysql/:/docker-entrypoint-initdb.d | ||
healthcheck: | ||
test: ["CMD", "mysqladmin" ,"ping", "-hlocalhost", "-ptest"] | ||
interval: 5s | ||
timeout: 1s | ||
retries: 20 | ||
start_period: 5s | ||
|
||
sight: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: always | ||
ports: | ||
- "3000:3000" | ||
- 3000:3000 | ||
environment: | ||
- NODE_ENV=development | ||
depends_on: | ||
mysql: | ||
condition: service_healthy |
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,12 @@ | ||
import { defineConfig } from '@mikro-orm/mysql'; | ||
|
||
import { EntityModels } from '@khlug/core/persistence/Entities'; | ||
|
||
export default defineConfig({ | ||
entities: EntityModels, | ||
host: 'localhost', | ||
port: 3306, | ||
user: 'root', | ||
password: 'test', | ||
dbName: 'khlug', | ||
}); |
Oops, something went wrong.