some changes to stuff
Signed-off-by: Odyssey346 <odyssey346@disroot.org>
This commit is contained in:
parent
11a156e4e3
commit
7c1c80e0a9
3
docker.env
Normal file
3
docker.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
HCAPTCHA_SITE_KEY='YOURSITEKEY'
|
||||||
|
HCAPTCHA_SECRET_KEY='YOURSECRETKEY'
|
||||||
|
SEGFAUTILITIES_WEBHOOK_URL='YOURWEBHOOKURL'
|
@ -19,19 +19,19 @@ func CheckEnv() {
|
|||||||
log.Fatal("[Segfautilities] Environment variable SEGFAUTILITIES_PORT is not set! Please set it to a number, for example 6893")
|
log.Fatal("[Segfautilities] Environment variable SEGFAUTILITIES_PORT is not set! Please set it to a number, for example 6893")
|
||||||
}
|
}
|
||||||
unused, ok1 = os.LookupEnv("HCAPTCHA_SITE_KEY")
|
unused, ok1 = os.LookupEnv("HCAPTCHA_SITE_KEY")
|
||||||
if !ok1 {
|
if !ok1 || unused == "YOURSITEKEY" {
|
||||||
log.Fatal("[Segfautilities] Environment variable HCAPTCHA_SITE_KEY is not set! Please set it to the site key you got from hCaptcha.")
|
log.Fatal("[Segfautilities] Environment variable HCAPTCHA_SITE_KEY is not set! Please set it to the site key you got from hCaptcha.")
|
||||||
} else {
|
} else {
|
||||||
log.Println("[Segfautilities] Environment variable HCAPTCHA_SITE_KEY is set as " + unused)
|
log.Println("[Segfautilities] Environment variable HCAPTCHA_SITE_KEY is set as " + unused)
|
||||||
}
|
}
|
||||||
unused, ok1 = os.LookupEnv("HCAPTCHA_SECRET_KEY")
|
unused, ok1 = os.LookupEnv("HCAPTCHA_SECRET_KEY")
|
||||||
if !ok1 {
|
if !ok1 || unused == "YOURSECRETKEY" {
|
||||||
log.Fatal("[Segfautilities] Environment variable HCAPTCHA_SECRET_KEY is not set! Please set it to the secret key you got from hCaptcha.")
|
log.Fatal("[Segfautilities] Environment variable HCAPTCHA_SECRET_KEY is not set! Please set it to the secret key you got from hCaptcha.")
|
||||||
} else {
|
} else {
|
||||||
log.Println("[Segfautilities] Environment variable HCAPTCHA_SECRET_KEY is set!")
|
log.Println("[Segfautilities] Environment variable HCAPTCHA_SECRET_KEY is set!")
|
||||||
}
|
}
|
||||||
unused, ok1 = os.LookupEnv("SEGFAUTILITIES_WEBHOOK_URL")
|
unused, ok1 = os.LookupEnv("SEGFAUTILITIES_WEBHOOK_URL")
|
||||||
if !ok1 {
|
if !ok1 || unused == "YOURWEBHOOKURL" {
|
||||||
log.Fatal("[Segfautilities] Environment variable SEGFAUTILITIES_WEBHOOK_URL is not set! Please set it to your webhook URL. If that URL doesn't work, make an issue on GitHub!")
|
log.Fatal("[Segfautilities] Environment variable SEGFAUTILITIES_WEBHOOK_URL is not set! Please set it to your webhook URL. If that URL doesn't work, make an issue on GitHub!")
|
||||||
} else {
|
} else {
|
||||||
log.Println("[Segfautilities] Environment variable SEGFAUTILITIES_WEBHOOK_URL is set!")
|
log.Println("[Segfautilities] Environment variable SEGFAUTILITIES_WEBHOOK_URL is set!")
|
||||||
|
@ -8,8 +8,10 @@ For now it powers our contact form. In the future we will expand our APIs so you
|
|||||||
|
|
||||||
### Docker:
|
### Docker:
|
||||||
```
|
```
|
||||||
docker run -d --restart=always -p 6893:6893 --name segfautilities projectsegfault/segfautilities:latest -e HCAPTCHA_SITE_KEY='YOURSITEKEY' -e HCAPTCHA_SECRET_KEY='YOURSECRETKEY' -e SEGFAUTILITIES_WEBHOOK_URL='YOURWEBHOOKURL'
|
docker run -d --restart=always -p 6893:6893 --name segfautilities projectsegfault/segfautilities:latest --env-file ./docker.env
|
||||||
```
|
```
|
||||||
|
docker.env should be the environment file located in this repository, customized to your settings. The env file is self-documenting so I don't need to go in any detail here.
|
||||||
|
|
||||||
|
|
||||||
We recommend using Docker as it provides better security (we suck in security, so that's why) and we are constantly updating Segfautilities. Docker makes it easy to update the program.
|
We recommend using Docker as it provides better security (we suck in security, so that's why) and we are constantly updating Segfautilities. Docker makes it easy to update the program.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user