initial: split from gov-agreg — vreau.digital standalone platform
Moved from gov-agreg/src/pages/achizitii/* to root (drop prefix). - 22 pages migrated, 127 files total - All internal links: /achizitii/X → /X (176 occurrences fixed) - AchizitiiLayout subnav rewritten: /X paths, top-right link to vreaudigital.ro hub - BaseLayout new (vreau.digital branding, OG tags, site URL) - astro.config.mjs: site https://vreau.digital, server output (was static) - docker-compose: port 5096 (vreaudigital is 5095), container vreau-digital - deploy.sh: paths /opt/vreau-digital, log /var/log/vreau-digital-deploy.log Backend shared with gov-agreg: - PostgreSQL satra (same schemas: seap, firms, anaf, anre, ...) - Photon, Martin tiles - Infisical /vreaudigital path (DATABASE_URL etc. shared) build: PASS (npx astro check 0 errors, npm run build 5s vite + 10s server)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# systemd units for vreaudigital scrapers + housekeeping
|
||||
|
||||
These files mirror the units installed on satra at `/etc/systemd/system/vreaudigital-*.{service,timer}`. Commit the source of truth here; install on satra with `sudo cp` + `sudo systemctl daemon-reload + enable --now`.
|
||||
|
||||
## Currently installed on satra
|
||||
|
||||
| Unit | Schedule | What it does |
|
||||
|---|---|---|
|
||||
| `vreaudigital-anaf-daily.timer` | daily | ANAF v9 enrichment (incremental) |
|
||||
| `vreaudigital-onrc-weekly.timer` | Tue 03:00 | ONRC bulk refresh |
|
||||
| `vreaudigital-mvs.timer` | daily 04:00 | Refresh seap materialized views |
|
||||
| `vreaudigital-heartbeat.timer` | daily 07:00 | Data-freshness probe across 20 sources |
|
||||
|
||||
## Install procedure
|
||||
|
||||
```bash
|
||||
# from this repo, copy units to satra:
|
||||
scp services/seap-scraper/systemd/vreaudigital-<name>.{service,timer} \
|
||||
satra:/tmp/
|
||||
ssh satra "sudo cp /tmp/vreaudigital-<name>.{service,timer} /etc/systemd/system/ && \
|
||||
sudo systemctl daemon-reload && \
|
||||
sudo systemctl enable --now vreaudigital-<name>.timer"
|
||||
```
|
||||
|
||||
## Inspect
|
||||
|
||||
```bash
|
||||
ssh satra "systemctl status vreaudigital-<name>.timer --no-pager"
|
||||
ssh satra "journalctl -u vreaudigital-<name>.service --since today --no-pager"
|
||||
```
|
||||
|
||||
## Manual test (without timer)
|
||||
|
||||
```bash
|
||||
ssh satra "sudo systemctl start vreaudigital-<name>.service"
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape aaas
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-aaas.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — aaas weekly
|
||||
Requires=vreaudigital-aaas.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Wed *-*-* 01:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape aep-donatii
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-aep-donatii.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — aep-donatii monthly
|
||||
Requires=vreaudigital-aep-donatii.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-01 03:30:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape anaf datornici (live, 2captcha)
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-anaf-datornici-live.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — anaf datornici quarterly (1 Jan/Apr/Jul/Oct 04:00)
|
||||
Requires=vreaudigital-anaf-datornici.service
|
||||
|
||||
[Timer]
|
||||
# Trimestrul T_N e publicat de ANAF cu ~45-60 zile delay, deci aici rulăm
|
||||
# pe data 1 a lunilor 1/4/7/10 — ne dă întotdeauna trimestrul precedent
|
||||
# (current_quarter() în scraper face shift -1).
|
||||
OnCalendar=*-01,04,07,10-01 04:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=1800
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape anaf lista_alba (live, 2captcha)
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-anaf-lista-alba.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — anaf lista_alba quarterly (1 Jan/Apr/Jul/Oct 05:00, +1h vs datornici)
|
||||
Requires=vreaudigital-anaf-lista-alba.service
|
||||
|
||||
[Timer]
|
||||
# Same quarterly cadence as anaf-datornici, offset by 1 hour to avoid
|
||||
# contention on shared resources (Infisical, 2captcha, postgres).
|
||||
OnCalendar=*-01,04,07,10-01 05:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=1800
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape ancom
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-ancom.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — ancom weekly
|
||||
Requires=vreaudigital-ancom.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Mon *-*-* 01:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape anre
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-anre.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — anre weekly
|
||||
Requires=vreaudigital-anre.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Sun *-*-* 01:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape apia-fermieri
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-apia-fermieri.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — apia-fermieri monthly
|
||||
Requires=vreaudigital-apia-fermieri.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-15 03:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape asf
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-asf.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — asf weekly
|
||||
Requires=vreaudigital-asf.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Tue *-*-* 01:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape cnas
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-cnas.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — cnas monthly
|
||||
Requires=vreaudigital-cnas.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-01 05:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape cnsc
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-cnsc.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — cnsc weekly
|
||||
Requires=vreaudigital-cnsc.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Sat *-*-* 01:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape curteacont
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-curteacont.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — curteacont weekly
|
||||
Requires=vreaudigital-curteacont.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Thu *-*-* 01:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape SEAP direct acquisitions (DA)
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
TimeoutStartSec=14400
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-da.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — SEAP DA daily incremental
|
||||
Requires=vreaudigital-da.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 02:30:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape gnm
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-gnm.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — gnm weekly
|
||||
Requires=vreaudigital-gnm.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Fri *-*-* 01:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — daily data-freshness heartbeat
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/heartbeat.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — heartbeat daily at 07:00
|
||||
Requires=vreaudigital-heartbeat.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 07:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — scrape regas
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bulibasa
|
||||
ExecStart=/opt/vreaudigital/services/seap-scraper/cron/scrape-regas.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=vreaudigital — regas monthly
|
||||
Requires=vreaudigital-regas.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-01 03:00:00
|
||||
Persistent=true
|
||||
RandomizedDelaySec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user