diff --git a/deploy/systemd/production.service b/deploy/systemd/production.service index dfc1e11..616dc37 100644 --- a/deploy/systemd/production.service +++ b/deploy/systemd/production.service @@ -8,12 +8,13 @@ WorkingDirectory=/home/deploy/production User=deploy Group=deploy EnvironmentFile=/etc/env/projectreshoot.env -Environment="HOST=0.0.0.0" +Environment="HOST=127.0.0.1" Environment="PORT=3000" Environment="TRUSTED_HOST=projectreshoot.com" Environment="SSL=true" Environment="GZIP=true" Environment="LOG_LEVEL=info" +Environment="LOG_OUTPUT=file" Environment="LOG_DIR=/home/deploy/production/logs" LimitNOFILE=65536 Restart=on-failure diff --git a/deploy/systemd/staging.service b/deploy/systemd/staging.service new file mode 100644 index 0000000..566aa56 --- /dev/null +++ b/deploy/systemd/staging.service @@ -0,0 +1,29 @@ +[Unit] +Description=Project Reshoot Staging +After=network.target + +[Service] +ExecStart=/home/deploy/staging/projectreshoot +WorkingDirectory=/home/deploy/staging +User=deploy +Group=deploy +EnvironmentFile=/etc/env/staging.projectreshoot.env +Environment="HOST=127.0.0.1" +Environment="PORT=3005" +Environment="TRUSTED_HOST=staging.projectreshoot.com" +Environment="SSL=true" +Environment="GZIP=true" +Environment="LOG_LEVEL=debug" +Environment="LOG_OUTPUT=both" +Environment="LOG_DIR=/home/deploy/staging/logs" +LimitNOFILE=65536 +Restart=on-failure +TimeoutSec=30 +PrivateTmp=true +NoNewPrivilages=true +AmbientCapabilites=CAP_NET_BIND_SERVICE +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target