mirror of
https://git.freecumextremist.com/icscarythings/treebird-docker.git
synced 2024-11-27 05:33:56 +00:00
Fix formatting and add updating section to readme
This commit is contained in:
parent
de3754a283
commit
d26d49dfeb
1 changed files with 51 additions and 0 deletions
51
README.md
51
README.md
|
@ -26,14 +26,19 @@ the Gitea release tab. Here I'm going to assume the latter.
|
|||
|
||||
3. Load the image
|
||||
|
||||
```
|
||||
sudo docker load -i treebird-latest.tar.gz
|
||||
```
|
||||
|
||||
4. Add an unprivileged treebrid user and group to the host (this is needed to avoid uid/gid conflicts)
|
||||
|
||||
```
|
||||
sudo useradd -r -s /bin/false -c 'Treebird FE user' -U treebird
|
||||
```
|
||||
|
||||
5. Run the container as below to start in daemon mode (`-d`) on port 4008 as user:group treebird:treebird
|
||||
|
||||
```
|
||||
docker run \
|
||||
--rm \
|
||||
--name treebird \
|
||||
|
@ -49,19 +54,25 @@ the Gitea release tab. Here I'm going to assume the latter.
|
|||
# To have it auto start on reboot you need to either add to your init system
|
||||
# or manage with a docker wrapper like docker-compose or etc.
|
||||
# TODO: instructions
|
||||
```
|
||||
|
||||
6. Add a web folder for the static files
|
||||
|
||||
```
|
||||
sudo mkdir -p /var/www/treebird
|
||||
sudo chmod a+r /var/www/treebird
|
||||
```
|
||||
|
||||
7. Extract static files to web folder
|
||||
|
||||
```
|
||||
tar -xzf treebird-static-latest.tar.gz
|
||||
sudo cp -r treebird-latest/* /var/www/treebird
|
||||
```
|
||||
|
||||
8. Setup your Nginx Configuration (other servers idk for now)
|
||||
|
||||
```
|
||||
# In case the folders do not exist yet, do the following
|
||||
sudo mkdir -p /etc/nginx/sites-{available,enabled}
|
||||
|
||||
|
@ -77,9 +88,49 @@ the Gitea release tab. Here I'm going to assume the latter.
|
|||
|
||||
# Start nginx
|
||||
sudo systemctl start nginx
|
||||
```
|
||||
|
||||
It should now be running on the domain you configured.
|
||||
|
||||
## Updating
|
||||
This is process is similar to the install, but without the need for config changes.
|
||||
|
||||
1. Download the latest tarballs from the release tab again.
|
||||
|
||||
2. Stop the running container and remove the old image
|
||||
|
||||
```
|
||||
docker stop treebird
|
||||
docker rmi treebird:latest
|
||||
```
|
||||
|
||||
3. Load the new one
|
||||
|
||||
```
|
||||
docker load -i treebird-latest-HASH.tar.gz
|
||||
```
|
||||
|
||||
4. Start the container again
|
||||
|
||||
```
|
||||
docker run \
|
||||
--rm \
|
||||
--name treebird \
|
||||
-p 127.0.0.1:4008:4008 \
|
||||
-u "`id -u treebird`:`id -g treebird`" \
|
||||
-e TREEBIRD_CFG_INSTANCE_URL="https://my.instance.domain/" \
|
||||
-d "treebird:latest"
|
||||
```
|
||||
|
||||
5. Extract and update static files
|
||||
|
||||
```
|
||||
tar -xzf treebird-static-files-HASH.tar.gz
|
||||
sudo cp -rf treebird-latest/* /var/www/treebird
|
||||
```
|
||||
|
||||
Your install should now be running and up to date
|
||||
|
||||
## Building
|
||||
Building the container should be as simple as running `build_container.sh` and
|
||||
waiting for the build to complete.
|
||||
|
|
Loading…
Reference in a new issue