Introduces the Go photo-api service, nginx/systemd deploy wiring, and Next.js gallery/lightbox pages so event photos can be managed and browsed. Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
890 B
Desktop File
31 lines
890 B
Desktop File
[Unit]
|
|
Description=Spanglish Photo Gallery API
|
|
Documentation=https://git.azzamo.net/Michilis/Spanglish
|
|
After=network.target spanglish-backend.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=spanglish
|
|
Group=spanglish
|
|
WorkingDirectory=/home/spanglish/Spanglish/photo-api
|
|
EnvironmentFile=/home/spanglish/Spanglish/photo-api/.env
|
|
Environment=PORT=3020
|
|
# Apply pending photos_* migrations before serving (idempotent, advisory-locked)
|
|
ExecStartPre=/home/spanglish/Spanglish/photo-api/bin/photo-api migrate
|
|
ExecStart=/home/spanglish/Spanglish/photo-api/bin/photo-api
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
SyslogIdentifier=spanglish-photos
|
|
|
|
# Security hardening (mirrors spanglish-backend.service)
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=read-only
|
|
ReadWritePaths=/home/spanglish/Spanglish/photo-api/data
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|