forked from coop-cloud/federatedwiki
update to cc commit a7bda15182
This commit is contained in:
parent
826a25edb3
commit
10d66575cf
|
@ -1,11 +0,0 @@
|
||||||
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
|
|
||||||
file: config.owner.json.tmpl
|
|
||||||
template_driver: golang
|
|
49
compose.yaml
49
compose.yaml
|
@ -1,23 +1,26 @@
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: dobbs/farm:1.0.18
|
image: dobbs/farm:1.0.20
|
||||||
command: /bin/sh config/install.sh
|
command: /bin/sh entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
- "fedwiki_friends:/home/node/config"
|
|
||||||
- "${FEDWIKI_VOLUME}:/home/node/.wiki"
|
- "${FEDWIKI_VOLUME}:/home/node/.wiki"
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
configs:
|
configs:
|
||||||
- source: install_sh_conf
|
- source: entrypoint_sh_conf
|
||||||
target: /home/node/config/install.sh
|
target: /home/node/entrypoint.sh
|
||||||
- source: config_json_conf
|
- source: config_json_initial_conf
|
||||||
target: /home/node/config/config.json
|
target: /home/node/initial-config/config.json
|
||||||
|
secrets:
|
||||||
|
- cookie_secret
|
||||||
environment:
|
environment:
|
||||||
- DOMAIN
|
- DOMAIN
|
||||||
- COOKIE_SECRET
|
- COOKIE_SECRET
|
||||||
- AUTHOR
|
- AUTHOR
|
||||||
- ADMIN_KEY
|
- ADMIN_KEY
|
||||||
deploy:
|
deploy:
|
||||||
|
update_config:
|
||||||
|
order: start-first
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
labels:
|
labels:
|
||||||
|
@ -34,26 +37,32 @@ services:
|
||||||
- "caddy.tls.on_demand="
|
- "caddy.tls.on_demand="
|
||||||
- "backupbot.backup=true"
|
- "backupbot.backup=true"
|
||||||
- "backupbot.backup.path=/home/node/.wiki"
|
- "backupbot.backup.path=/home/node/.wiki"
|
||||||
# healthcheck:
|
healthcheck:
|
||||||
# test: ["CMD", "curl", "-f", "http://localhost"]
|
test: "node -e 'var http = require(\"http\"); var options = { host : \"localhost\", port : \"3000\", timeout : 2000, path : \"/view/welcome-visitors\", headers: { \"Host\": \"${DOMAIN}\" } }; var request = http.request(options, (res)
|
||||||
# interval: 30s
|
=> { console.log(`STATUS: $${res.statusCode}`); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } }); request.on(\"error\", function(err) { console.log('ERROR');
|
||||||
# timeout: 10s
|
process.exit(1); }); request.end();'"
|
||||||
# retries: 10
|
interval: 10s
|
||||||
# start_period: 1m
|
timeout: 2s
|
||||||
|
retries: 2
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
fedwiki:
|
fedwiki:
|
||||||
fedwiki_friends:
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
cookie_secret:
|
||||||
|
external: true
|
||||||
|
name: ${STACK_NAME}_cookie_secret
|
||||||
|
|
||||||
configs:
|
configs:
|
||||||
install_sh_conf:
|
entrypoint_sh_conf:
|
||||||
name: ${STACK_NAME}_install_sh
|
name: ${STACK_NAME}_entrypoint_sh
|
||||||
file: install.sh
|
file: entrypoint.sh
|
||||||
config_json_conf:
|
config_json_initial_conf:
|
||||||
name: ${STACK_NAME}_config_json
|
name: ${STACK_NAME}_config_initial_json
|
||||||
file: config.json.tmpl
|
file: config.initial.json.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"farm": true,
|
||||||
|
"cookieSecret": "{{ secret "cookie_secret" }}",
|
||||||
|
"secure_cookie": true,
|
||||||
|
"security_type": "friends"
|
||||||
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"admin": "{{ env "ADMIN_KEY" }}",
|
|
||||||
"farm": true,
|
|
||||||
"cookieSecret": "{{ env "COOKIE_SECRET" }}",
|
|
||||||
"secure_cookie": true,
|
|
||||||
"security_type": "friends"
|
|
||||||
{{ if eq (env "FEDWIKI_IS_PRIVATE") "1" }},
|
|
||||||
"wikiDomains": {
|
|
||||||
"$DOMAIN": {
|
|
||||||
"id": "/home/node/.wiki/config.owner.json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{{ end }}
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"name": "{{ env "AUTHOR" }}",
|
|
||||||
"friend": {
|
|
||||||
"secret": "{{ env "PASSWORD" }}"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -4,8 +4,4 @@ if [ ! -f .wiki/config.json ]; then
|
||||||
cp config/config.json .wiki/config.json
|
cp config/config.json .wiki/config.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f .wiki/config.owner.json ]; then
|
|
||||||
cp config/config.owner.json .wiki/config.owner.json
|
|
||||||
fi
|
|
||||||
|
|
||||||
wiki --farm
|
wiki --farm
|
Loading…
Reference in New Issue