mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-05-09 08:25:29 +02:00
[GH-ISSUE #20] config file? #3
Labels
No labels
bug
enhancement
pull-request
question
question
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/unifi-voucher-site#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aroundmyroom on GitHub (Dec 17, 2022).
Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/20
Originally assigned to: @glenndehaan on GitHub.
Just installed it without docker and its running, but wondering if I do miss the config file? cause in 2 files I had to change IP / site and at the end somewhere in the /modules/unifi.js the username / password. (and/or site / ip as well)
@glenndehaan commented on GitHub (Dec 17, 2022):
No you are not missing a config file the application uses environment variables to configure itself. So you can just supply those when launching the app, the variables are described in the example docker compose file.
@aroundmyroom commented on GitHub (Dec 17, 2022):
Ah clear ..
for what's worth
#!/bin/bash
export UNIFI_IP='10.1.1.1'
export UNIFI_PORT='443'
export UNIFI_USERNAME='username'
export UNIFI_PASSWORD='password'
export UNIFI_SITE_ID='default'
export SECURITY_CODE='000'
export VOUCHER_TYPES='480,0,,,;1440,1,,,;10080,1,,,;525600,1,,,;'
export WEBPORT='80'
cd /home/unifi-voucher-site
/root/.nvm/versions/node/v19.3.0/bin/node server.js
Notes: npm start does not work with systemctl (I could not get it working) so I start the application with node server.js.
and now systemctl is working fine.
Would love to have support for SSL so that I can use my own certificates
(using your script on a debian machine with npm 19 replacing my own ugly php script) ;)
(NB. as it is an home LXC server I do not care about usernames or things being root yes/no). stuff is not outside my network available
@glenndehaan commented on GitHub (Dec 18, 2022):
I would always recommend using a reverse proxy and not to expose the node process directly. The reverse proxy would then handle the SSL termination and could for example integrate with letsencrypt.
@aroundmyroom commented on GitHub (Dec 18, 2022):
Agree and can do that I have nginx proxy manager running, but is unnecessary when you run this locally. It's not a strong need, but a nice to have ;)