diff --git a/README.md b/README.md index 67128eb..aee173e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@

## ๐Ÿง Introduce ---- @@ -22,7 +21,7 @@ @@ -47,72 +45,89 @@

-## ๐Ÿ‘พ System Architecture ---- -image -
+ ## ๐ŸŒˆ Feature ---- + ### JWT๋ฅผ ์ด์šฉํ•œ ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ
-image -image + +image +image

-### ์ปค๋ฒ„์‚ฌ์ง„ ๋ณ€๊ฒฝ ๋ฐ ์‹œ์ž‘
-image +### ์ปค๋ฒ„์‚ฌ์ง„, ํ…Œ๋งˆ ๋ณ€๊ฒฝ ๋ฐ ์‹œ์ž‘
+ +image +image

-### ์ผ๊ธฐ์ž‘์„ฑ
+### ์ผ๊ธฐ์ž‘์„ฑ(with ํ‚ค์›Œ๋“œ)
+ ์ผ๊ธฐ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  <๊ทธ๋ฆผ๊ฐ€์ ธ์˜ค๊ธฐ> ๋ฅผ ๋ˆ„๋ฆ…๋‹ˆ๋‹ค. AI ๋กœ ํ‚ค์›Œ๋“œ๋ฅผ ์ถ”์ถœํ•˜์—ฌ ์ด๋ฏธ์ง€๋ฅผ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.
๊ทธ๋ฆผ์„ ์„ ํƒํ•˜๊ฑฐ๋‚˜ <๊ทธ๋ฆผ๊ทธ๋ฆฌ๊ธฐ>๋กœ ์ง์ ‘ ๊ทธ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. -image +image +
+
+ +### ์ผ๊ธฐ์ž‘์„ฑ(with Dall-E)
+ +์ผ๊ธฐ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ๋ฅผ ๋ˆ„๋ฆ…๋‹ˆ๋‹ค. Dall-E AI ๋กœ ์ถ”์ถœ๋œ ์ด๋ฏธ์ง€๋ฅผ ์„ ํƒํ•˜์—ฌ ๊ทธ๋ฆผ์ผ๊ธฐ๋ฅผ ์™„์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. +image

### ์บ˜๋ฆฐ๋”๋กœ ์ผ๊ธฐ ์กฐํšŒ
-image + +image

-### ์ž‘์„ฑ๋ฐฉ๋ฒ• ๋ฐ ์†Œ๊ฐœ
-image +### ์ผ๊ธฐ ๊ฒ€์ƒ‰
+ +image


-## ๐Ÿ“น [Demo]((https://www.youtube.com/watch?v=RCUEUDk4sVw)) -[![Video Label](http://img.youtube.com/vi/nJmduw8adEg/0.jpg)](https://youtu.be/nJmduw8adEg) + -


## ๐Ÿ’ป Tech Stack ---- +

+ - + + +

- - + + + + + + +

@@ -122,8 +137,6 @@ - -

@@ -136,150 +149,146 @@

``` -- Frontend: React, Zustand -- Backend : Django, Django-Rest-FrameWork -- Web Server: Nginx, +- Frontend: Vite, React, TypeScript, React-Query, Zustand, Styled-Components +- Backend : SpringBoot, Spring-Security, JPA, Gradle, Flask +- Web Server: Nginx - Asynchronous: Celery, Rabbitmq - WSGI: Gunicorn -- Database: AWS RDS MySQL -- AI : KoNLPy +- Database: AWS RDS MySQL, Redis +- AI : KoNLPy, Dall-E 2 - Deployment: Docker, AWS EC2, AWS S3 bucket - API Test : Postman - API Documentation : Swagger -- Monitoring : prometheus, grafana - Others: Github, Notion, Zoom, Slack, Figma - ```


-## ๐ŸŽฏ ERD ---- -image -
-
-
- ## ๐Ÿ“• API ---- -image
-- api/v1/auth : ์‚ฌ์šฉ์ž ์ •๋ณด ํ™•์ธ, ๋กœ๊ทธ์ธ, ๋กœ๊ทธ์•„์›ƒ -- api/v1/users : ์‚ฌ์šฉ์ž ์ปค๋ฒ„ ์ด๋ฏธ์ง€ ๋ณ€๊ฒฝ -- api/v1/results : ๊ฒฐ๊ณผ ํ‚ค์›Œ๋“œ ๋ณ„ ์ด๋ฏธ์ง€ ์กฐํšŒ -- api/v1/text/ : ์ผ๊ธฐ๋‚ด์šฉ ํ‚ค์›Œ๋“œ ์ถ”์ถœ (AI) -- api/v1/join : ํšŒ์›๊ฐ€์ž… -- api/v1/diaries : ์ผ๊ธฐ ๋ชฉ๋ก ์กฐํšŒ, ๋“ฑ๋ก, ์กฐํšŒ -
-
-
+### ์ผ๊ธฐ, ์œ ์ € ๊ด€๋ จ API -## Monitoring ---- -| node exporter | Django | -| :------------: | :-------------: | -| image | image | +image
+ +- api/users/login : ์‚ฌ์šฉ์ž ์ •๋ณด ํ™•์ธ, ๋กœ๊ทธ์ธ +- api/users/logout: ๋กœ๊ทธ์•„์›ƒ +- api/users/join : ํšŒ์›๊ฐ€์ž… +- api/users/profile: ์‚ฌ์šฉ์ž ์ปค๋ฒ„ ์ด๋ฏธ์ง€ ์กฐํšŒ, ๋ณ€๊ฒฝ +- api/users/theme: ํ…Œ๋งˆ ๋ณ€๊ฒฝ
-
-
+ +- api/diaries : ์ผ๊ธฐ ๋ชฉ๋ก ์กฐํšŒ, ๋“ฑ๋ก +- api/diaries/{diaryId}: ์ผ๊ธฐ ์‚ญ์ œ +- api/diaries/search: ์ผ๊ธฐ ์ œ๋ชฉ/๋‚ด์šฉ ๊ฒ€์ƒ‰ +
+
+
## ๐Ÿณ How to start ---- + ### 1. clone the repository + ``` -git clone https://github.com/2023-SV-winter-bootcamp-G-Diary/G-Diary.git +git clone https://github.com/AI-ary/docker-v2.git ``` +

### 2. Set environment file
-Path: G-Diary/backend/config/my_settings.py
-Django secret key & MySQL ํ™˜๊ฒฝ๋ณ€์ˆ˜ & S3 bucket -``` -from pathlib import Path -BASE_DIR = Path(__file__).resolve().parent.parent - - -MY_SECRET = { - "SECRET_KEY" : '' -} - -MY_DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME' : '', - 'USER' : '', - 'PASSWORD' : '', - 'HOST': '', - 'PORT': '3306', - 'OPTIONS':{ - 'init_command' : "SET sql_mode='STRICT_TRANS_TABLES'" - } - } -} - -MY_AWS_ACCESS_KEY_ID = { - "AWS_ACCESS_KEY_ID" :'' -} -MY_AWS_ACCESS_ACCESS_KEY = { - "AWS_SECRET_ACCESS_KEY" : "" -} -MY_STORAGE_BUCKET_NAME = { - "BUCKET_NAME" : "" -} -``` -
-Path: /G-Diary/backend/.env -MySQL container ํ™˜๊ฒฝ ๋ณ€์ˆ˜ & RabbitMQ ํ™˜๊ฒฝ๋ณ€์ˆ˜ +Path: /docker-v2/backend-spring/src/main/resources/application.yml
+RDS, Redis, JWT ์ถ”๊ฐ€ ``` -DEBUG=False -MYSQL_DATABASE= -MYSQL_ROOT_PASSWORD= -MYSQL_PORT=3306 -TZ=Asia/Seoul -RABBITMQ_HOST= -RABBITMQ_USER= -RABBITMQ_PASSWORD= -RABBITMQ_VHOST= +server: + servlet: + context-path: /api + +spring: + application: + name: aiary + jpa: + database: mysql + show-sql: true + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.MySQL8Dialect + format_sql: true + generate-ddl: true + redis: + host: localhost # ๋กœ์ปฌ: localhost / docker: redis + port: 6379 + + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: + username: + password: + +cloud: + aws: + s3: + bucket: + stack.auto: + region.static: + credentials: + accessKey: + secretKey: + +jwt: + secret: ``` -
-Path: /G-Diary/frontend/.env.local
-์นด์นด์˜คํ†ก ๊ณต์œ ํ•˜๊ธฐ ํ™˜๊ฒฝ๋ณ€์ˆ˜ (ํ˜„์žฌ ๋กœ์ปฌ์—์„œ๋งŒ ๊ฐ€๋Šฅ) -``` -REACT_APP_KAKAO_KEY='' -```
-Path: /G-Diary/.env
-RabbitMQ ํ™˜๊ฒฝ๋ณ€์ˆ˜ +Path: /docker-v2/Ai-flask/.env +AI ํ™˜๊ฒฝ๋ณ€์ˆ˜ ``` -RABBITMQ_HOST= +# Dalle Open AI +OPEN_AI_KEY= + +# Database +DB_USERNAME= +DB_PASSWORD= +DB_HOST= +DB_SCHEMA= +DB_PORT= + +# RabbitMq RABBITMQ_USER= RABBITMQ_PASSWORD= -RABBITMQ_VHOST= + +# S3 +ACCESS_KEY_ID= +SECRET_ACCESS_KEY= +S3_BUCKET_REGION= +S3_BUCKET_NAME= ``` +

### 3. Run + ``` docker-compose -f docker-compose.prod.yml up --build ``` +


## ๐Ÿ‘จโ€๐Ÿ’ป Members ---- -| [๋ฐ•ํฌ๊ฒฝ](https://github.com/gmlrude) | [์ด๋ฏผ์ง€](https://github.com/alswlfl29) | [์ž„๊ด‘์ˆ˜](https://github.com/gs0428) | -| --- | --- | --- | -| | | | -| Leader, Backend, DevOps | Frontend, DevOps | Frontend | + +| [๊ณ ์›์ค€](https://github.com/KoneJ) | [๋ฐ•ํฌ๊ฒฝ](https://github.com/gmlrude) | [๋ฐ•์ค€์ˆ˜](https://github.com/GaBaljaintheroom) | [์ด๋ฏผ์ง€](https://github.com/alswlfl29) | [์ž„๊ด‘์ˆ˜](https://github.com/gs0428) | [์ด์˜ˆ์€]() | +| ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| | | | | | | +| PM | Leader, Backend, DevOps | Backend, DevOps | Frontend | Frontend | Design | ![Footer](https://capsule-render.vercel.app/api?type=waving&color=auto&height=200&width=1212§ion=footer) diff --git a/backend-spring b/backend-spring index d3379e5..d4832e3 160000 --- a/backend-spring +++ b/backend-spring @@ -1 +1 @@ -Subproject commit d3379e53f332c32bfbef309fb2676145d9d20198 +Subproject commit d4832e3458009f972618bce1aff1b6b7decff7c2 diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 756526a..b55ad33 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -17,7 +17,7 @@ services: environment: - CI=true - CHOKIDAR_USEPOLLING=true - - REACT_APP_BACKEND_URL=http://localhost + - REACT_APP_BACKEND_URL=http://www.aiary.net stdin_open: true tty: true networks: @@ -67,13 +67,15 @@ services: context: ./nginx dockerfile: Dockerfile ports: + - "443:443" - "80:80" volumes: - build_frontend:/var/www/frontend - ./nginx/nginx.conf:/etc/nginx/nginx.conf - ./nginx/log:/var/log/nginx - expose: - - "80" + # expose: + # - "80" + # - "443" depends_on: - ai_backend - backend diff --git a/frontend b/frontend index 1a59b19..6b3bb4f 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 1a59b196373c989a65784e7afc48078c6a6a7fec +Subproject commit 6b3bb4fec5ec09d79687f75cd6edfaa5080cf0a7 diff --git a/nginx/nginx.conf b/nginx/nginx.conf index b598e36..107a2c4 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -24,9 +24,9 @@ http { server { listen 80; charset utf-8; - server_name localhost; + server_name http://www.aiary.net; client_max_body_size 0; - + location /ai_api/ { proxy_pass http://ai_api; proxy_set_header Host $host:$server_port;
- image + image
@@ -31,12 +30,11 @@ ์ด ์„ธ์ƒ์— ๋‹จ ํ•˜๋‚˜๋ฐ–์— ์—†๋Š” ๊ทธ๋ฆผ ์ผ๊ธฐ๋ฅผ ์ž‘์„ฑํ•ด๋ณด์„ธ์š”

- -๐Ÿ”— [www.gdiary.org](http://www.gdiary.org)
- -๐Ÿ““ [medium](https://medium.com/@dkfud2121/g-diary-3e90e87722a2) - -
+ํ˜„์žฌ๋Š” ์„œ๋ฒ„ ์ค‘์ง€๋œ ์ƒํƒœ์ž…๋‹ˆ๋‹ค!
+ +๐Ÿ”— [www.aiary.net](https://www.aiary.net)
+ +