README.md
13.6 KB
매무리 봇 (Mamuri-bot)
사용자에게 입력받은 키워드를 통해 3곳의 중고매물 사이트(중고나라, 당근마켓, 번개장터)에 매물을 감지, 알림을 전송하는 봇입니다.
About The Project
- 봇을 사용해 키워드를 입력 받습니다.
- 주기적 크롤링을 통해 새로운 매물을 감지해 알림을 전송합니다.
Overview
Project Architecture
Built With
Getting Started
Prerequisites
Need to installation docker and docker-compose
Need to write secret
mamuri-bot/database/mysql_init/.env
# Database Configuration
TZ=Asia/Seoul
MYSQL_HOST={YOUR_MYSQL_HOST}
MYSQL_PORT={YOUR_MYSQL_PORT}
MYSQL_ROOT_PASSWORD={YOUR_MYSQL_ROOT_PASSWORD}
mamuri-bot/joongna/config/.env
# Secret Configuration
SECRET.CLIENTID={NAVER_API_CLIENT_ID}
SECRET.CLIENTSECRET={NAVER_API_CLIENT_SECRET}
# Header Configuration
HEADER.COOKIE=NID_SES={YOUR_COOKIE}
HEADER.USERAGENT={YOUR_SYSTEM_USER_AGENT}
mamuri-bot/ngrok/ngrok.yml
authtoken: { YOUR_NGROK_AUTH_TOKEN }
version: 2
tunnels:
mamuri:
proto: http
addr: mamuri-server:8080
-
mamuri-bot/server/config/.env
dotenv channelAccessToken: {YOUR_LINE_CHANNEL_ACCESS_TOKEN} channelId: {YOUR_LINE_CHANNEL_ID} channelSecret: {YOUR_LINE_CHANNEL_SECRET}
Installation
- Clone the repository
git clone http://khuhub.khu.ac.kr/2018102211/mamuri-bot
- Put your secret files that you create in prerequisite to
mamuri-bot/database/mysql_init/.env
mamuri-bot/joongna/config/.env
mamuri-bot/ngrok/ngrok.yml
mamuri-bot/server/config/.env
- Executing
deploy.sh
for deployment with docker-compose. This script willbuild
all images automatically anddocker-compose up
on your system
#!/usr/bin/env bash
./deploy.sh
# docker build -t daangn-api-server ./daangn/
# docker build -t joongna-api-server ./joongna/
# docker build -t bunjang-api-server ./bunjang/
# docker build -t mamuri-db ./database/
# docker build -t mamuri-server ./server/
# docker build -t mamuri-ngrok ./ngrok/
# docker-compose up -d
- Check your ngrok public URL
docker logs mamuri-ngrok
- Set your public URL to Line chatbot configuration for webhook
Contributing
프로젝트에 기여하고 싶으신 분들은 아래 절차를 따라주시기 바랍니다.
- 프로젝트 fork
- feature branch 생성 (git checkout -b feature/name)
- commit (git commit -m "Add feature)
- push (git push origin feature/name)
- pull request 생성
License
MIT 라이센스 아래 사용 가능합니다. LICENSE.txt를 통해 자세한 정보를 확인하세요.
Contact
- 유명현: mhlew0106@khu.ac.kr
- 윤준석: phobyjun@khu.ac.kr