merca y ch
This commit is contained in:
15
deploy/systemd/benell-marketing-sync.service
Normal file
15
deploy/systemd/benell-marketing-sync.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Casa Benell Marketing Meta Daily Sync
|
||||
After=network.target benell.service
|
||||
Wants=benell.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=mdares03
|
||||
Group=mdares03
|
||||
WorkingDirectory=/home/mdares03/benell
|
||||
EnvironmentFile=-/home/mdares03/benell/.env
|
||||
EnvironmentFile=-/home/mdares03/benell/.env.local
|
||||
ExecStart=/bin/bash -lc 'set -euo pipefail; test -n "${MARKETING_SYNC_CRON_SECRET:-}"; curl -fsS -X POST "http://127.0.0.1:${PORT:-3000}/api/marketing/meta/sync" -H "Authorization: Bearer ${MARKETING_SYNC_CRON_SECRET}" -H "Content-Type: application/json" --data "{}"'
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
11
deploy/systemd/benell-marketing-sync.timer
Normal file
11
deploy/systemd/benell-marketing-sync.timer
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Run Casa Benell Marketing Meta Sync every day at 06:00
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 06:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=120
|
||||
Unit=benell-marketing-sync.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
21
deploy/systemd/benell.service
Normal file
21
deploy/systemd/benell.service
Normal file
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Casa Benell Next.js App
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=mdares03
|
||||
Group=mdares03
|
||||
WorkingDirectory=/home/mdares03/benell
|
||||
Environment=NODE_ENV=production
|
||||
Environment=PORT=3000
|
||||
ExecStart=/usr/bin/npm run start -- --port=3000 --hostname=0.0.0.0
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=30
|
||||
KillSignal=SIGINT
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user