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=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
./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