You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
785 B
INI
34 lines
785 B
INI
[Unit]
|
|
Description=node.js on {{ domain }}
|
|
After=syslog.target
|
|
After=network.target
|
|
Requires=mariadb.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{ system_user }}
|
|
Group={{ system_user }}
|
|
|
|
WorkingDirectory={{ src }}
|
|
ExecStart=/usr/bin/npm start
|
|
Environment="USER={{ system_user }}"
|
|
Environment="HOME={{ user_directory }}"
|
|
Environment="NODE_ENV=production"
|
|
Environment="PORT={{ app_port }}"
|
|
Environment="DOMAIN={{ domain }}"
|
|
Environment="DATABASE_HOST=127.0.0.1"
|
|
Environment="DATABASE_PORT=3306"
|
|
Environment="DATABASE_USERNAME={{ database_user }}"
|
|
Environment="DATABASE_PASSWORD={{ database_pass }}"
|
|
Environment="DATABASE_NAME={{ database_name }}"
|
|
|
|
TimeoutStartSec=2s
|
|
TimeoutStopSec=10s
|
|
Restart=always
|
|
RestartSec=2s
|
|
StartLimitInterval=60s
|
|
StartLimitBurst=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|