module.exports = {
apps : [{
name : "my_app",
cwd : "/abosolute/path-to/my-app/",
script : "main.py",
cron_restart : "0 * * * *",
interpreter: "/absolute/path-to/venv/bin/python",
log_date_format: "DD-MM HH:mm:ss.SSS"
}]
}
< /code>
Ich erhalte den folgenden Fehler < /p>
0|my_app | 10-04 16:03:15.501: SyntaxError: unterminated string literal (detected at line 29)
0|my_app | 10-04 16:03:15.527: File "/usr/local/lib/node_modules/pm2/lib/ProcessContainerForkBun.js", line 29
0|my_app | 10-04 16:03:15.527: // Change some values to make node think that the user's application
0|my_app | 10-04 16:03:15.528: ^
0|my_app | 10-04 16:03:15.528: SyntaxError: unterminated string literal (detected at line 29)
0|my_app | 10-04 16:03:15.557: File "/usr/local/lib/node_modules/pm2/lib/ProcessContainerForkBun.js", line 29
0|my_app | 10-04 16:03:15.557: // Change some values to make node think that the user's application
< /code>
Ich kann das Skript mit CMD < /p>
ausführen.pm2 start main.py --interpreter=../venv/bin/python
< /code>
funktioniert auch in folgenden 2 Fällen < /p>
Wenn ich CWD entferne und absolute Pfad in Skript anbietet, funktioniert es, aber ich möchte nicht, dass Probleme mit Python -Skript -Lesendateien erstellt. /> Knotenversion: v18.19.1
pm2 Version: 6.0.5
Python Version: 3.12.3 < /p>
Wie Bereitstellung von Python -Skript mit PM2 und Virtual Env mithilfe von Ecosystem.config.js ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post