* 'master' of https://github.com/tborychowski/self-hosted-cookbook:
  update docker installation docs
  Update notea.md
  notea
This commit is contained in:
Tomasz Borychowski 2022-05-11 23:35:50 +01:00
commit b8ac9600ec
3 changed files with 78 additions and 23 deletions

View File

@ -350,6 +350,7 @@ The aims is to provide a ready-to-run recipes that you can just copy, paste and
- [Confluence](apps/wiki/confluence.md)
- [Bluespice free](apps/wiki/bluespice.md)
- [Bookstack](apps/wiki/bookstack.md)
- [Notea](apps/wiki/notea.md)
- [Wiki.js](apps/wiki/wikijs.md)
- [XWiki](apps/wiki/xwiki.md)

64
apps/wiki/notea.md Normal file
View File

@ -0,0 +1,64 @@
# Notea
- This is probably more of a note-taking app rather than a wiki, but why not :-)
- Setup with docker is a bit more challenging than the usual `docker-compose up -d`
- Layout is very minimalistic
- Command palette!
- `/<command>` when writing is great!
- Extremely fast to start-up (not really a feature, but still impressive)
<br>
- [Homepage](https://cinwell.com/notea/)
- [GitHub repo](https://github.com/QingWei-Li/notea)
## docker-compose.yml
```yml
---
services:
notea:
image: cinwell/notea
container_name: notea
environment:
- STORE_ACCESS_KEY=086o0ITYnydXRzxO
- STORE_SECRET_KEY=7FKZabUq7LCWyhgYyTh39A26vZMKb99G
- STORE_BUCKET=notea
- STORE_END_POINT=http://notea-db:9000
- STORE_FORCE_PATH_STYLE=true
- COOKIE_SECURE=false
- BASE_URL="http://192.168.1.10:3123/"
#- PASSWORD=notea
- DISABLE_PASSWORD=true
ports:
- "3123:3000"
notea-db:
image: minio/minio
container_name: notea-db
command: server /data --console-address ":9001"
environment:
#- MINIO_BROWSER=off
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=admin123
ports:
- "3124:9000"
- "3125:9001"
volumes:
- ./data:/data
```
### Next steps
Notea requires external storage. Minio container stands in place of Amazon S3. We just need to create a "Bucket" in minio, so:
#### Create a Bucket
1. Go to `<serverIP:3125>` (- minio admin console)
2. Login using `admin:admin123` credentials from `docker-compose.yml` file
3. Create a new bucket with the name `notea` (no need for any other options, just name)
#### Access Keys
1. Next click "Identity/Service Accounts" in the sidebar and click "Create service account" button
2. Either copy the "Access Key" and "Secret Key" from the yaml above or generate a new pair of keys and update them in your `docker-compose.yml` (and restart it afterwards).
That's it!
Notea should be available at `<serverIP:3123>`

View File

@ -8,35 +8,25 @@ Installation instructions for Ubuntu Linux from: https://docs.docker.com/engine/
sudo apt-get remove docker docker-engine docker.io containerd runc
```
## Install Docker
## Install Docker & docker-compose-plugin (on Ubuntu)
```sh
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
```
sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
## Install `docker-compose`
From: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04
```sh
sudo apt-get remove docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
```
## Usage
Full docs are here: https://docs.docker.com/compose/reference/overview/
Generally the idea of `docker-compose` command is simple:
Generally the idea of `docker compose` command is simple:
1. First you create a folder for your service, e.g. `home-assistant`
2. Then you then create a `docker-compose.yml` file, which describes the service containers
3. You run `docker-compose up -d` and you're done!
3. You run `docker compose up -d` and you're done!
Here are the most frequently used commands:
@ -44,20 +34,20 @@ Here are the most frequently used commands:
#### Start a container
`-d` starts in a detached mode - which basically mean that it runs it in the background (so you can do other stuff, instead of looking at the logs).
```sh
docker-compose up -d
docker compose up -d
```
### Stop a container
There are 2 options:
```sh
docker-compose stop
docker-compose down
docker compose stop
docker compose down
```
First one (`stop`) onlu stops the containers, whereas the latter (`down`) does some more cleaning (removes the containers, networks, volumes), so I generally recommend `down` if you're tinkering.
### Update a container to use the latest published image
```sh
docker-compose pull && docker-compose up -d
docker compose pull && docker compose up -d
```
This pulls the latest images as defined in the local `docker-compose.yml` and recreates the containers.