Some checks failed
CI / test-backend (pull_request) Successful in 5m30s
CI / build (pull_request) Has been skipped
CI / secret-scanning (pull_request) Has been skipped
CI / dependency-scan (pull_request) Has been skipped
CI / sast-scan (pull_request) Has been skipped
CI / lint-and-type-check (pull_request) Has been cancelled
CI / python-lint (pull_request) Has been cancelled
CI / workflow-summary (pull_request) Has been cancelled
CI / skip-ci-check (pull_request) Has been cancelled
This commit introduces a new `DEPLOYMENT_CHECKLIST.md` file that outlines the necessary steps for configuring server-specific settings after pulling from Git. It includes instructions for environment files, PM2 configuration, firewall rules, database setup, and building frontends. Additionally, it adds an example `ecosystem.config.js.example` file for PM2 configuration, providing a template for users to customize for their deployment environment. The `.gitignore` file is updated to include the new PM2 ecosystem config file.
70 lines
2.6 KiB
Plaintext
70 lines
2.6 KiB
Plaintext
module.exports = {
|
|
apps: [
|
|
{
|
|
name: 'punimtag-api',
|
|
script: 'venv/bin/uvicorn',
|
|
args: 'backend.app:app --host 0.0.0.0 --port 8000',
|
|
cwd: '/opt/punimtag', // CHANGE: Update to your deployment directory
|
|
interpreter: 'none',
|
|
env: {
|
|
PYTHONPATH: '/opt/punimtag', // CHANGE: Update to your deployment directory
|
|
PATH: '/opt/punimtag/venv/bin:/usr/local/bin:/usr/bin:/bin', // CHANGE: Update paths
|
|
},
|
|
error_file: '/home/appuser/.pm2/logs/punimtag-api-error.log', // CHANGE: Update user home directory
|
|
out_file: '/home/appuser/.pm2/logs/punimtag-api-out.log', // CHANGE: Update user home directory
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
|
merge_logs: true,
|
|
autorestart: true,
|
|
watch: false,
|
|
max_memory_restart: '1G',
|
|
},
|
|
{
|
|
name: 'punimtag-worker',
|
|
script: 'venv/bin/python',
|
|
args: '-m backend.worker',
|
|
cwd: '/opt/punimtag', // CHANGE: Update to your deployment directory
|
|
interpreter: 'none',
|
|
env: {
|
|
PYTHONPATH: '/opt/punimtag', // CHANGE: Update to your deployment directory
|
|
PATH: '/opt/punimtag/venv/bin:/usr/local/bin:/usr/bin:/bin', // CHANGE: Update paths
|
|
},
|
|
error_file: '/home/appuser/.pm2/logs/punimtag-worker-error.log', // CHANGE: Update user home directory
|
|
out_file: '/home/appuser/.pm2/logs/punimtag-worker-out.log', // CHANGE: Update user home directory
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
|
merge_logs: true,
|
|
autorestart: true,
|
|
watch: false,
|
|
max_memory_restart: '1G',
|
|
},
|
|
{
|
|
name: 'punimtag-admin',
|
|
script: './serve.sh',
|
|
cwd: '/opt/punimtag/admin-frontend', // CHANGE: Update to your deployment directory
|
|
interpreter: 'bash',
|
|
error_file: '/home/appuser/.pm2/logs/punimtag-admin-error.log', // CHANGE: Update user home directory
|
|
out_file: '/home/appuser/.pm2/logs/punimtag-admin-out.log', // CHANGE: Update user home directory
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
|
merge_logs: true,
|
|
autorestart: true,
|
|
watch: false,
|
|
},
|
|
{
|
|
name: 'punimtag-viewer',
|
|
script: 'npm',
|
|
args: 'run start:3001',
|
|
cwd: '/opt/punimtag/viewer-frontend', // CHANGE: Update to your deployment directory
|
|
interpreter: 'node',
|
|
env: {
|
|
PORT: '3001',
|
|
},
|
|
error_file: '/home/appuser/.pm2/logs/punimtag-viewer-error.log', // CHANGE: Update user home directory
|
|
out_file: '/home/appuser/.pm2/logs/punimtag-viewer-out.log', // CHANGE: Update user home directory
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
|
merge_logs: true,
|
|
autorestart: true,
|
|
watch: false,
|
|
},
|
|
],
|
|
};
|
|
|