Initial import

This commit is contained in:
3wc 2021-07-17 21:57:04 +02:00
commit ac6086bbf4
5 changed files with 62 additions and 0 deletions

6
.env.sample Normal file
View File

@ -0,0 +1,6 @@
TYPE=federatedwiki
DOMAIN=federatedwiki.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.federatedwiki.example.com`'
LETS_ENCRYPT_ENV=production

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.envrc

1
abra.sh Normal file
View File

@ -0,0 +1 @@
export INSTALL_SH_VERSION=v3

47
compose.yml Normal file
View File

@ -0,0 +1,47 @@
---
version: "3.8"
services:
app:
image: dobbs/farm
command: /bin/sh config/install.sh
volumes:
- "fedwiki_friends:/home/node/config"
- "fedwiki:/home/node/.wiki"
networks:
- proxy
configs:
- source: install_sh_conf
target: /home/node/config/install.sh
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
## Redirect from EXTRA_DOMAINS to DOMAIN
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
volumes:
fedwiki:
fedwiki_friends:
networks:
proxy:
external: true
configs:
install_sh_conf:
name: ${STACK_NAME}_install_sh_${INSTALL_SH_VERSION}
file: install.sh

7
install.sh Normal file
View File

@ -0,0 +1,7 @@
apk --update add gettext
chown -R node:node .wiki
/usr/bin/envsubst < config/config.json > .wiki/config.json
/usr/bin/envsubst < config/config.owner.json > .wiki/config.owner.json
chown -R node:node .wiki
wiki --farm --security_type=friends