- Notifications
You must be signed in to change notification settings - Fork18
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
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
cp app_example.yaml app.yaml
docker-compose up --build
docker-compose exec crawl go mod tidy
docker-compose exec crawl go mod vendor
docker-compose exec crawl go run cmd/main.go
docker-compose exec crawl air -c .air.conf
make copy_template build_app_web build_app_crawl
Create Services in run in background (https://www.atpeaz.com/running-go-app-as-a-service-on-ubuntu/amp/)
sudo nano /lib/systemd/system/app_web.service
[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
./app_crawl
crontab -e
*/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
sudo service cron reload