[Unit]
Description=Liberi Kids - Sistema de Controle de Estoque
After=network.target
Documentation=https://github.com/seu-repo

[Service]
Type=simple
User=tiago
Group=tiago
WorkingDirectory=/home/tiago/Downloads/app_estoque_v1.0.0
Environment=NODE_ENV=production
Environment=PORT=5000
ExecStart=/usr/bin/node server-supabase.js
Restart=always
RestartSec=10
StandardOutput=append:/home/tiago/Downloads/app_estoque_v1.0.0/logs/system.log
StandardError=append:/home/tiago/Downloads/app_estoque_v1.0.0/logs/error.log
SyslogIdentifier=liberi-kids

# Segurança
NoNewPrivileges=true
PrivateTmp=true

# Limites de recursos
LimitNOFILE=65536
MemoryLimit=1G

[Install]
WantedBy=multi-user.target
