Add base-path deployment support
This commit is contained in:
20
deploy/apache-vhost.template.conf
Normal file
20
deploy/apache-vhost.template.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName __SERVER_NAME__
|
||||
Redirect permanent / https://__SERVER_NAME__/
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName __SERVER_NAME__
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile __SSL_CERT_FILE__
|
||||
SSLCertificateKeyFile __SSL_KEY_FILE__
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests Off
|
||||
|
||||
RedirectMatch 301 ^/__BASE_PATH__$ /__BASE_PATH__/
|
||||
|
||||
ProxyPass /__BASE_PATH__/ http://127.0.0.1:__APP_PORT__/
|
||||
ProxyPassReverse /__BASE_PATH__/ http://127.0.0.1:__APP_PORT__/
|
||||
</VirtualHost>
|
||||
16
deploy/doclink-web.service.template
Normal file
16
deploy/doclink-web.service.template
Normal file
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=DocLink Web
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=__WORKING_DIRECTORY__
|
||||
EnvironmentFile=__ENV_FILE__
|
||||
ExecStart=/usr/bin/node __WORKING_DIRECTORY__/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
User=__RUN_USER__
|
||||
Group=__RUN_GROUP__
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
3
deploy/env.template
Normal file
3
deploy/env.template
Normal file
@@ -0,0 +1,3 @@
|
||||
DOCLINK_BASE_PATH=/__BASE_PATH__
|
||||
PORT=__APP_PORT__
|
||||
DOCLINK_API_BASE=https://devbandungraya.aplikasi.web.id/one-api-doctor/doctor_mitra
|
||||
Reference in New Issue
Block a user