Compare commits
3 commits
dc47ddbb16
...
a4099b9b1a
Author | SHA1 | Date | |
---|---|---|---|
a4099b9b1a | |||
6e9ca2e345 | |||
a630174f7e |
3 changed files with 70 additions and 0 deletions
9
wikijs/.env-example.com
Normal file
9
wikijs/.env-example.com
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Wiki.js
|
||||||
|
WIKIJS_VERSION=2
|
||||||
|
WIKIJS_DOMAIN=wiki.example.com
|
||||||
|
|
||||||
|
# PostgreSQL
|
||||||
|
WIKIJS_POSTGRES_VERSION=16
|
||||||
|
WIKIJS_POSTGRES_DATABASE=wikijs
|
||||||
|
WIKIJS_POSTGRES_USER=wikijs
|
||||||
|
WIKIJS_POSTGRES_PASSWORD=securepassword123
|
0
wikijs/README.md
Normal file
0
wikijs/README.md
Normal file
61
wikijs/docker-compose.yml
Normal file
61
wikijs/docker-compose.yml
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
---
|
||||||
|
services:
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:${WIKIJS_POSTGRES_VERSION:-16}
|
||||||
|
container_name: wikijs-db
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- wikijs
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: ${WIKIJS_POSTGRES_DATABASE:?error}
|
||||||
|
POSTGRES_PASSWORD: ${WIKIJS_POSTGRES_PASSWORD:?error}
|
||||||
|
POSTGRES_USER: ${WIKIJS_POSTGRES_user:-wikijs}
|
||||||
|
logging:
|
||||||
|
driver: none
|
||||||
|
volumes:
|
||||||
|
- db:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
wiki:
|
||||||
|
image: ghcr.io/requarks/wiki:${WIKIJS_VERSION:-2}
|
||||||
|
container_name: wikijs
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- wikijs
|
||||||
|
- traefik
|
||||||
|
environment:
|
||||||
|
DB_TYPE: postgres
|
||||||
|
DB_HOST: db
|
||||||
|
DB_PORT: 5432
|
||||||
|
DB_USER: ${WIKIJS_POSTGRES_USER:-wikijs}
|
||||||
|
DB_PASS: ${WIKIJS_POSTGRES_PASSWORD:?error}
|
||||||
|
DB_NAME: ${WIKIJS_POSTGRES_DATABASE:?error}
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=traefik"
|
||||||
|
- "traefik.http.routers.wikijs.entrypoints=http"
|
||||||
|
- "traefik.http.routers.wikijs.rule=Host(`${WIKIJS_DOMAIN:?error}`)"
|
||||||
|
- "traefik.http.middlewares.wikijs-https-redirect.redirectscheme.scheme=https"
|
||||||
|
- "traefik.http.routers.wikijs.middlewares=wikijs-https-redirect"
|
||||||
|
- "traefik.http.routers.wikijs-secure.entrypoints=https"
|
||||||
|
- "traefik.http.routers.wikijs-secure.rule=Host(`${WIKIJS_DOMAIN:?error}`)"
|
||||||
|
- "traefik.http.routers.wikijs-secure.tls=true"
|
||||||
|
- "traefik.http.routers.wikijs-secure.service=wikijs"
|
||||||
|
- "traefik.http.services.wikijs.loadbalancer.server.port=3000"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 90s
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
||||||
|
wikijs:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db:
|
Loading…
Add table
Reference in a new issue