Change file app_example.yaml to app.yaml
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
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
[Unit]
Description=App Web
[Service]
Type=simple
Restart=always
RestartSec=5s
WorkingDirectory=/root/actions-runner/crawl/crawl/crawl/bin
ExecStart=/root/actions-runner/crawl/crawl/crawl/bin/app_web
[Install]
WantedBy=multi-user.target
sudo systemctl enable app_web
sudo systemctl start app_web
sudo systemctl status app_web
*/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
http://techdaily.info/