/corona-kakao-bot

๐Ÿค– ์นด์นด์˜คํ†ก ์ฝ”๋กœ๋‚˜ ์•Œ๋ฆฌ๋ฏธ

Primary LanguagePythonMIT LicenseMIT

Welcome to Corona Kakao Bot ๐Ÿ‘‹

Version License: MIT crawler docker compose crawler docker compose crawler docker compose

character

์นด์นด์˜คํ†ก์„ ํ†ตํ•ด ์ฝ”๋กœ๋‚˜ ์ •๋ณด๋ฅผ ์•Œ๋ ค์ฃผ๋Š” ์ฑ„๋„ ๋ด‡์ž…๋‹ˆ๋‹ค.


๐Ÿ”‘ ์ฑ„๋„ ์•„์ด๋”” : coronavirus19

๐Ÿ“ท Qr ์ฝ”๋“œ

Qr์ฝ”๋“œ



๐Ÿ“œ ๋ด‡ & ์„œ๋ฒ„ ํ…Œ์ŠคํŠธ

๊ฐœ๋ฐœ ํ™˜๊ฒฝ : Ubuntu Server 20.04 LTS x86

์‚ฌ์ „ ์„ค์น˜ ํ”„๋กœ๊ทธ๋žจ

  1. git ์„ค์น˜

    $ sudo apt install git -y
  2. ๋„์ปค ์„ค์น˜

  3. ๋„์ปค ์ปดํฌ์ฆˆ ์„ค์น˜(root๊ถŒํ•œ์—์„œ ์„ค์น˜)

    ๋ ˆํฌ์—์„œ ๋ฆด๋ฆฌ์ฆˆ ์ตœ์‹  ๋ฒ„์ „ ํ™•์ธ

    $ curl -L https://github.com/docker/compose/releases/download/(์ตœ์‹ ๋ฒ„์ „)/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
    $ chmod +x /usr/local/bin/docker-compose
    $ docker-compose -v

์„œ๋ฒ„ ์‹œ๊ฐ„ KST๋กœ ๋ณ€๊ฒฝ

์„œ๋ฒ„์™€ ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์‹œ๊ฐ„๋Œ€๋ฅผ ๊ณต์œ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์„œ๋ฒ„์˜ ์‹œ๊ฐ„๋Œ€๋ฅผ ํ•œ๊ตญ ์‹œ๊ฐ„๋Œ€๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.

$ sudo dpkg-reconfigure tzdata
Asia
Seoul

์ปจํ…Œ์ด๋„ˆ ์„ค์น˜

$ git clone https://github.com/PARKINHYO/corona-kakao-bot.git
$ cd corona-kakao-bot/crawler
$ docker-compose up -d
$ cd corona-kakao-bot
$ docker-compose up -d

์ปจํ…Œ์ด๋„ˆ ๋กœ๊ทธ ๊ด€๋ฆฌ

ํฌ๋กค๋ง ๋กœ๊ทธ๊ฐ€ ๋งŽ์ด ์Œ“์—ฌ ์ผ์ • ๊ฐ„๊ฒฉ์œผ๋กœ ์‚ญ์ œํ•ฉ๋‹ˆ๋‹ค.

$ cd corona-kakao-bot
$ sh container-logs.sh

์ฝ”๋กœ๋‚˜ ๊ด€๋ จ ์ •๋ณด ํ™•์ธ

์ฝ”๋กœ๋‚˜ ๊ด€๋ จ ์ •๋ณด๋“ค์€ /crawler/assets ํด๋”์— ์ €์žฅ๋ฉ๋‹ˆ๋‹ค.

  • /assets/texts/daily : ๋‚ ์งœ, ์ด ํ™•์ง„์ž, 0์‹œ ๊ธฐ์ค€ ์‹ ๊ทœ ํ™•์ง„์ž, ๊ฒฉ๋ฆฌ ํ•ด์ฒด, ์น˜๋ฃŒ ์ค‘, ์‚ฌ๋ง
  • /assets/images/dailyimage.png : ์ฃผ๊ฐ„ ํ™•์ง„์ž ๊ทธ๋ž˜ํ”„
  • /assets/texts/realtime : ์‹œ๊ฐ„, ๋™ ์‹œ๊ฐ„๋Œ€ ์–ด์ œ ํ™•์ง„์ž, ์‹ค์‹œ๊ฐ„ ํ™•์ง„์ž
  • /assets/texts/cities/ : ์ง€์—ญ๋ณ„ ์žฌ๋‚œ ๋ฌธ์ž

์ฐธ๊ณ 

  • ์‹ค์ œ ์„œ๋น„์Šค์— ํ™œ์šฉํ•  ๋•Œ๋Š” ์ด ๋ถ€๋ถ„์— ์ž์‹ ์˜ ์„œ๋ฒ„ ip๋ฅผ ์ ์–ด์ฃผ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  • ์ฒ˜์Œ์—๋Š” /crawler/assets ํด๋”์— ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๊ฐ€ ๋“ค์–ด์žˆ์Šต๋‹ˆ๋‹ค.
  • ์žฌ๋‚œ ๋ฌธ์ž ํฌ๋กค๋ง์€ ์ตœ๋Œ€ 4๋ถ„ ์ •๋„ ๋ฉ๋‹ˆ๋‹ค. (๋‚˜๋จธ์ง€๋Š” ๋ช‡ ์ดˆ)
  • ๊ฐ ๊ธฐ๋Šฅ๋งˆ๋‹ค ํฌ๋กค๋ง ์ฃผ๊ธฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.



๐Ÿ“ฃ ์„œ๋ฒ„ API

์„ค์น˜๋œ ์„œ๋ฒ„์˜ ip์ฃผ์†Œ์™€ ํฌํŠธ 80๋ฒˆ์œผ๋กœ ์›น์„œ๋ฒ„์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • /corona/daily/text : 0์‹œ ๊ธฐ์ค€ ์ด ํ™•์ง„์ž ์ •๋ณด
  • /corona/daily/image : ์ฃผ๊ฐ„ ํ™•์ง„์ž ๊ทธ๋ž˜ํ”„
  • /corona/realtime/text : ์‹ค์‹œ๊ฐ„ ํ™•์ง„์ž
  • /corona/message/text : ์ง€์—ญ๋ณ„ ์žฌ๋‚œ ๋ฌธ์ž



๐Ÿ“Œ Service Flow Chart

Service Flow Chart



๐Ÿ“Œ Architecture

Architecture



๐ŸŽฅ ๋ฐ๋ชจ

์‚ฌ์šฉ๋ฐฉ๋ฒ•



๐Ÿ“š ์ถœ์ฒ˜

๐Ÿ–‹ Author

๐Ÿ‘ค ๋ฐ•์ธํšจ

๐Ÿ“ License

Copyright ยฉ 2021 ๋ฐ•์ธํšจ.
This project is MIT licensed.


This README was generated with โค๏ธ by readme-md-generator