mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-03-31 06:24:00 -04:00
65c29e2e83659a0d1b71b382e7be7c030cc90a21
UniFi Voucher Site
A small UniFi Voucher Site for simple voucher creation
Structure
- ES6 Javascript
- ExpressJS
- Node UniFi
- Tailwind
Development Usage
- Install NodeJS 16.0 or higher.
- Run
npm ciin the root folder - Run
npm start&npm run tailwindin the root folder
Then open up your favorite browser and go to http://localhost:3000/
Build Usage
- Install NodeJS 16.0 or higher.
- Run
npm ciin the root folder - Run
npm run buildin the root folder
Docker
- Code from master is build by Docker Hub
- Builds can be pulled by using this command:
docker pull glenndehaan/unifi-voucher-site - An example docker compose file can be found below:
version: '3'
services:
app:
image: glenndehaan/unifi-voucher-site
ports:
- "8081:3000"
environment:
# The IP address to your UniFi OS Console
UNIFI_IP: '192.168.1.1'
# The port of your UniFi OS Console, this could be 443 or 8443
UNIFI_PORT: 443
# The username of a local UniFi OS account
UNIFI_USERNAME: 'admin'
# The password of a local UniFi OS account
UNIFI_PASSWORD: 'password'
# The UniFi Site ID
UNIFI_SITE_ID: 'default'
# The 'password' used to log in to this voucher portal
SECURITY_CODE: '0000'
# Voucher Types, format: expiration in minutes (required),single-use or multi-use vouchers value - '0' is for multi-use - '1' is for single-use (optional),upload speed limit in kbps (optional),download speed limit in kbps (optional),data transfer limit in MB (optional)
# To skip a parameter just but nothing in between the comma's
# After a voucher type add a semicolon, after the semicolon you can start a new voucher type
VOUCHER_TYPES: '480,0,,,;'
License
MIT
Description
Languages
EJS
60.1%
JavaScript
38.7%
Dockerfile
0.7%
CSS
0.5%