Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Teach daily is web crawl by GoLang from web dev.to, freecodecamp.com, medium.com, hashnode.com, logrocket.com,infoq.com

NotificationsYou must be signed in to change notification settings

chieund/crawl

Repository files navigation

Change file app_example.yaml to app.yaml

cp app_example.yaml app.yaml

Build Docker

docker-compose up --build

Install package Golang

docker-compose exec crawl go mod tidy

Folder vendor

docker-compose exec crawl go mod vendor

Run Crawl

docker-compose exec crawl go run cmd/main.go

Use air autoload

docker-compose exec crawl air -c .air.conf

Deploy

Run file makefile build project into folder bin

make copy_template build_app_web build_app_crawl

Create Service and Run App Web

sudo nano /lib/systemd/system/app_web.service

Copy Content

[Unit]Description=App Web[Service]Type=simpleRestart=alwaysRestartSec=5sWorkingDirectory=/root/actions-runner/crawl/crawl/crawl/binExecStart=/root/actions-runner/crawl/crawl/crawl/bin/app_web[Install]WantedBy=multi-user.target
sudo systemctl enable app_websudo systemctl start app_websudo systemctl status app_web

Run App Crawl

./app_crawl

Add CronTab

crontab -e

add cron time

*/60 * * * * /root/actions-runner/crawl/crawl/crawl/bin/app_crawl crawl-article*/20 * * * * /root/actions-runner/crawl/crawl/crawl/bin/app_crawl crawl-article-detail

Reload cron run

sudo service cron reload

Website

http://techdaily.info/


"Buy Me A Coffee"

About

Teach daily is web crawl by GoLang from web dev.to, freecodecamp.com, medium.com, hashnode.com, logrocket.com,infoq.com

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp