inital setup

This commit is contained in:
2023-06-11 21:33:35 +02:00
parent 73025e848d
commit 6fc0b51fe9
4 changed files with 157 additions and 1 deletions

View File

@@ -1,2 +1,69 @@
# compose-wikijs
# Basic Wiki.js with MariaDB and Elasticsearch docker-compose config
* can be run on single node setup or in swarm
## howto
### single node
#### start container
```bash
docker compose up -d
```
#### stop container (and remove)
```bash
docker compose down
```
#### view logs
```bash
docker compose logs -f
```
#### reload config
```bash
docker compose restart
```
### swarm
#### start aka deploy
hint: drone fails to start until git auth source is created and set in vars
```bash
docker stack deploy -c docker-compose.yml wiki
```
#### stop container aka stack
```bash
docker stack rm wiki
```
#### view logs
```bash
docker service logs wiki_wiki -f
docker service logs wiki_db -f
docker service logs wiki_elastic -f
```
#### reload config (no downtime if replica 2 or more)
```bash
docker service update wiki_wiki
docker service update wiki_db
docker service update wiki_elastic
```
## example caddy config
```
wiki.example.com {
reverse_proxy wiki:3000
}
```
## config elastic search engin
1) Goto: Adminpanel => Search Engin
2) Select Elasticsearch
- Elasticsearch Version: 7.x
- Hosts: http://elastic:9300
- Index Name: wiki
3) Save with "Apply"
4) Hit "Rebuild index"
## source
- https://www.lucadentella.it/en/2022/05/10/wiki-js-ricerca-full-text-con-elasticsearch/