blob: 94f0799fa1fd151c6f96bb710025ad49c1d7ebca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
[Unit]
Description=House Hunter Scraper Service
Documentation=https://github.com/your-username/house-hunter
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
User=house-scraper
Group=house-scraper
WorkingDirectory=/opt/house-scraper
# Environment variables for configuration
Environment=COUCHDB_URL=https://couch.tammi.cc
Environment=COUCHDB_DATABASE=asunnot
Environment=S3_ENDPOINT=s3.tammi.cc
Environment=S3_BUCKET=asunnnot
Environment=SCRAPING_INTERVAL=24h
Environment=LOG_LEVEL=info
# Security settings
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/opt/house-scraper/logs /opt/house-scraper/tmp
# Process settings
ExecStart=/usr/local/bin/house-scraper
ExecStartPre=/usr/bin/sleep 30 # Wait for network to be fully up
# Credentials (store in /etc/systemd/system/house-scraper.service.d/credentials.conf)
Environment=S3_ACCESS_KEY=gQ1c5HvC4LyI9Pmt8UDW
Environment=S3_SECRET_KEY=D9iwHkQe18UoyxBzvaTc5KBeXWw2Wwu6qjo7YKzl
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=house-scraper
[Install]
WantedBy=multi-user.target
|