edit traefik.yml
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
dot: # <- ADD THIS
address: ":853" # <- ADD THISedit traefik.yml
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
dot: # <- ADD THIS
address: ":853" # <- ADD THIS| import Foundation | |
| // MARK: - Extensions | |
| extension URL { | |
| var isDirectory: Bool { | |
| (try? resourceValues(forKeys: [.isDirectoryKey]))?.isDirectory == true | |
| } | |
| } |
| # https://docs.linuxserver.io/images/docker-unifi-controller | |
| --- | |
| version: "2.1" | |
| services: | |
| unifi-controller: | |
| image: lscr.io/linuxserver/unifi-controller:latest | |
| container_name: unifi-controller | |
| environment: | |
| - PUID=1000 # for UserID | |
| - PGID=1000 # for GroupID |
NOTE: Content below is written by Adrian Mace. Click here for an updated version.
Below are the key settings that I apply on any unifi installation for optimal performance.
Enable Advanced Features is enabled| # RS256 | |
| # private key | |
| openssl genrsa -out rs256-4096-private.rsa 4096 | |
| # public key | |
| openssl rsa -in rs256-4096-private.rsa -pubout > rs256-4096-public.pem | |
| # ES512 | |
| # private key | |
| openssl ecparam -genkey -name secp521r1 -noout -out ecdsa-p521-private.pem | |
| # public key |
| #if os(iOS) || os(tvOS) | |
| import UIKit | |
| typealias UniColor = UIColor | |
| #else | |
| import Cocoa | |
| typealias UniColor = NSColor | |
| #endif | |
| private extension Int { | |
| func duplicate4bits() -> Int { |
| extension String { | |
| func matches(_ expression: String) -> Bool { | |
| if let range = range(of: expression, options: .regularExpression, range: nil, locale: nil) { | |
| return range.lowerBound == startIndex && range.upperBound == endIndex | |
| } else { | |
| return false | |
| } | |
| } | |
| var isValidEmail: Bool { |
| import UIKit | |
| extension UIImage { | |
| func resized(maxSize: CGFloat) -> UIImage? { | |
| let scale: CGFloat | |
| if size.width > size.height { | |
| scale = maxSize / size.width | |
| } | |
| else { | |
| scale = maxSize / size.height |
| import UIKit | |
| extension String { | |
| func height(withConstrainedWidth width: CGFloat, font: UIFont) -> CGFloat { | |
| let constraintRect = CGSize(width: width, height: .greatestFiniteMagnitude) | |
| let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [.font: font], context: nil) | |
| return ceil(boundingBox.height) | |
| } |