Make predefined "owner" security optional
This commit is contained in:
parent
b1895299dd
commit
f6e7eaa6f7
|
@ -5,6 +5,9 @@ DOMAIN=federatedwiki.example.com
|
||||||
#EXTRA_DOMAINS=', `www.federatedwiki.example.com`'
|
#EXTRA_DOMAINS=', `www.federatedwiki.example.com`'
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
|
|
||||||
|
# Predefined "owner" security
|
||||||
|
#COMPOSE_FILE="compose.yml:compose.owner.yml"
|
||||||
|
|
||||||
COOKIE_SECRET="asflkjqpweoriuwpeogdjgbpdofigh"
|
COOKIE_SECRET="asflkjqpweoriuwpeogdjgbpdofigh"
|
||||||
AUTHOR="Baja Colorado"
|
AUTHOR="Baja Colorado"
|
||||||
PASSWORD="Please Choose a Better Password"
|
PASSWORD="Please Choose a Better Password"
|
||||||
|
|
4
abra.sh
4
abra.sh
|
@ -1,3 +1,3 @@
|
||||||
export INSTALL_SH_VERSION=v5
|
export INSTALL_SH_VERSION=v7
|
||||||
export CONFIG_JSON_VERSION=v3
|
export CONFIG_JSON_VERSION=v6
|
||||||
export CONFIG_OWNER_JSON_VERSION=v3
|
export CONFIG_OWNER_JSON_VERSION=v3
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
---
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
configs:
|
||||||
|
- source: config_owner_json_conf
|
||||||
|
target: /home/node/config/config.owner.json
|
||||||
|
|
||||||
|
configs:
|
||||||
|
config_owner_json_conf:
|
||||||
|
name: ${STACK_NAME}_config_owner_json_${CONFIG_OWNER_JSON_VERSION}
|
||||||
|
file: config.owner.json.tmpl
|
||||||
|
template_driver: golang
|
|
@ -15,8 +15,6 @@ services:
|
||||||
target: /home/node/config/install.sh
|
target: /home/node/config/install.sh
|
||||||
- source: config_json_conf
|
- source: config_json_conf
|
||||||
target: /home/node/config/config.json
|
target: /home/node/config/config.json
|
||||||
- source: config_owner_json_conf
|
|
||||||
target: /home/node/config/config.owner.json
|
|
||||||
environment:
|
environment:
|
||||||
- DOMAIN
|
- DOMAIN
|
||||||
- COOKIE_SECRET
|
- COOKIE_SECRET
|
||||||
|
@ -56,7 +54,3 @@ configs:
|
||||||
name: ${STACK_NAME}_config_json_${CONFIG_JSON_VERSION}
|
name: ${STACK_NAME}_config_json_${CONFIG_JSON_VERSION}
|
||||||
file: config.json.tmpl
|
file: config.json.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
config_owner_json_conf:
|
|
||||||
name: ${STACK_NAME}_config_owner_json_${CONFIG_OWNER_JSON_VERSION}
|
|
||||||
file: config.owner.json.tmpl
|
|
||||||
template_driver: golang
|
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
"farm": true,
|
"farm": true,
|
||||||
"cookieSecret": "{{ env "COOKIE_SECRET" }}",
|
"cookieSecret": "{{ env "COOKIE_SECRET" }}",
|
||||||
"secure_cookie": true,
|
"secure_cookie": true,
|
||||||
"security_type": "friends",
|
"security_type": "friends"
|
||||||
|
{{ if eq (env "FEDAWIKI_IS_PRIVATE") "1" }},
|
||||||
"wikiDomains": {
|
"wikiDomains": {
|
||||||
"$DOMAIN": {
|
"$DOMAIN": {
|
||||||
"id": "/home/node/.wiki/config.owner.json"
|
"id": "/home/node/.wiki/config.owner.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{{ end }}
|
||||||
}
|
}
|
||||||
|
|
11
install.sh
11
install.sh
|
@ -1,4 +1,11 @@
|
||||||
cp -n config/config.json .wiki/config.json
|
#!/bin/sh
|
||||||
cp -n config/config.owner.json .wiki/config.owner.json
|
|
||||||
|
if [ ! -f .wiki/config.json ]; then
|
||||||
|
cp config/config.json .wiki/config.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f .wiki/config.owner.json ]; then
|
||||||
|
cp -n config/config.owner.json .wiki/config.owner.json
|
||||||
|
fi
|
||||||
|
|
||||||
wiki --farm --security_type=friends
|
wiki --farm --security_type=friends
|
||||||
|
|
Loading…
Reference in New Issue