-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinitialize.sh
46 lines (39 loc) · 1.29 KB
/
initialize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
git update-index --assume-unchanged initialize.sh
# 환경 변수 설정
GPT_API_KEY="{FILL}"
DEEPL_API_KEY="{FILL}"
SERVER_INTERNAL_IP="{FILL}"
SERVER_PORT_NUMBER="{FILL}"
export SQLITE_WEB_PASSWORD="{FILL}"
REACT_APP_APIKEY="{FILL}"
REACT_APP_AUTHDOMAIN="{FILL}"
REACT_APP_PROJECTID="{FILL}"
REACT_APP_STORAGEBUCKET="{FILL}"
REACT_APP_MESSAGINGSENDERID="{FILL}"
REACT_APP_APPID="{FILL}"
REACT_APP_MEASUREMENTID="{FILL}"
# 프론트엔드 설정 및 빌드
cd frontend
npm install
cd ..
# 백엔드 설정 및 가상 환경 구성
cd backend
python3 -m venv myenv
source myenv/bin/activate
pip3 install -r requirements.txt
cd ..
# 환경변수를 백엔드 .env 파일에 저장
echo "GPT_API_KEY=${GPT_API_KEY}
DEEPL_API_KEY=${DEEPL_API_KEY}
SERVER_INTERNAL_IP=${SERVER_INTERNAL_IP}
SERVER_PORT_NUMBER=${SERVER_PORT_NUMBER}" > ./backend/.env
# 프론트엔드 환경 변수 설정
echo "REACT_APP_APIKEY=${REACT_APP_APIKEY}
REACT_APP_AUTHDOMAIN=${REACT_APP_AUTHDOMAIN}
REACT_APP_PROJECTID=${REACT_APP_PROJECTID}
REACT_APP_STORAGEBUCKET=${REACT_APP_STORAGEBUCKET}
REACT_APP_MESSAGINGSENDERID=${REACT_APP_MESSAGINGSENDERID}
REACT_APP_APPID=${REACT_APP_APPID}
REACT_APP_MEASUREMENTID=${REACT_APP_MEASUREMENTID}" > ./frontend/.env
echo "Shell 스크립트가 성공적으로 실행되었습니다."