Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doong-jo/airbnb
airbnb-clone project
https://github.com/doong-jo/airbnb
nodejs react storybook
Last synced: about 2 months ago
JSON representation
airbnb-clone project
- Host: GitHub
- URL: https://github.com/doong-jo/airbnb
- Owner: doong-jo
- Created: 2019-12-15T13:28:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T04:22:59.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T02:49:46.839Z (2 months ago)
- Topics: nodejs, react, storybook
- Language: JavaScript
- Homepage:
- Size: 4.03 MB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Welcome to airbnb 👋
[![Netlify Status](https://api.netlify.com/api/v1/badges/3b601b2c-afa6-4a1a-b72d-8b04f04495b9/deploy-status)](https://app.netlify.com/sites/doong-airbnb-storybook/deploys)
## 📺 [Demo](https://doong-airbnb-storybook.netlify.com/)
## Env
```sh
# install redis-server (follow your OS)
# {project_root}/.env
DB_HOST=
DB_USER=
DB_PASSWORD=
DB_NAME=
SESSION_SECRET=
```## Install
```sh
npm install
npm run build
npm run data-init
```## Usage
```sh
npm run start
```## Run tests
```sh
npm run test
```## Deploy
### 로컬 배포
1. [Docker 설치](https://docs.docker.com/install/)
2. 'Dockerfile'과 같은 경로에서 아래의 명령을 실행```bash
# install
docker build -t membership/web-app .# run
docker run --name airbnb_app -p :80 -d membership/web-app# log (optional)
docker ps
docker logs
```#### (로컬) 배포 URL : localhost:[port you want] 👀
### 자동 배포
1. cron 스케줄링 설정
```bash
# ubuntu 기준# crontab 설치
apt-get update & apt-get upgrade
apt-get install cron
# 로컬 전용으로 설치, 메일 주소 default로
sudo apt-get install postfix# 프로젝트를 배포가 가능하도록 스케줄링 등록 (* * * * * : every miniute)
cat <(crontab -l) <(echo "* * * * * /auto-deploy.sh > /cron.log") | crontab -
```2. 배포 스크립트 작성 (auto_deploy.mock.sh 참고하여 auto_deploy.sh 생성)
```bash
# auto_deploy.mock.sh
# git 정보를 입력
username="your_user_name"
password="your_password"
branch="your_branch_name"url="https://$username:[email protected]/doong-jo/membership-airbnb.git"
cd $project_dir
git remote set-url origin $url
git fetchfind_origin="git rev-parse origin/$branch"
origin_hash=$($find_origin)find_local=$(git rev-parse $branch)
local_hash=$find_local# 같으면 exit
if [ "$origin_hash" == "$local_hash" ]; then
exit
fi# 둘이 다르면 build
git pull $urlsudo npm install
sudo npm start
```3. 권한 설정
```bash
# 파일 권한 설정 (실행 허용)
chmod +x auto_deploy.sh
```## Author
👤 **Sungdong Jo**
- Github: [@doong-jo](https://github.com/doong-jo)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/doong-jo/membership-airbnb/issues).## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2019 [Sungdong Jo](https://github.com/doong-jo).
This project is [MIT](https://github.com/doong-jo/membership-airbnb/blob/master/LICENSE) licensed.---
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_