[Unit] Description=Scanner de Códigos de Barras - Sistema de Notas Fiscais After=network.target Wants=network.target [Service] Type=simple User=fideflow Group=fideflow WorkingDirectory=/home/fideflow/public_html/api.fideflow.com.br ExecStart=/home/fideflow/public_html/api.fideflow.com.br/start_production.sh start ExecStop=/home/fideflow/public_html/api.fideflow.com.br/start_production.sh stop ExecReload=/home/fideflow/public_html/api.fideflow.com.br/start_production.sh restart # Reinício automático em caso de falha Restart=always RestartSec=10 # Limites de recursos LimitNOFILE=65536 LimitNPROC=4096 # Ambiente Environment=PYTHONPATH=/home/fideflow/public_html/api.fideflow.com.br Environment=FLASK_ENV=production Environment=FLASK_DEBUG=false # Logging StandardOutput=journal StandardError=journal SyslogIdentifier=scanner-app # Segurança NoNewPrivileges=yes ProtectSystem=strict ProtectHome=read-only ReadWritePaths=/home/fideflow/public_html/api.fideflow.com.br PrivateTmp=yes PrivateDevices=yes ProtectKernelTunables=yes ProtectControlGroups=yes [Install] WantedBy=multi-user.target