diff --git a/README.md b/README.md index 0203445..7dee292 100644 --- a/README.md +++ b/README.md @@ -27,67 +27,66 @@ the Gitea release tab. Here I'm going to assume the latter. 3. Load the image ``` - sudo docker load -i treebird-latest.tar.gz +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 +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 \ - -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" - - # You can verify this started by checking `docker ps` - # This should remain up until either the system is rebooted or the docker - # daemon is restarted (or you can manually stop with the docker stop command). - - # 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 +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" ``` +You can verify this started by checking `docker ps` +This should remain up until either the system is rebooted or the docker +daemon is restarted (or you can manually stop with the docker stop command). + +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. + 6. Add a web folder for the static files ``` - sudo mkdir -p /var/www/treebird - sudo chmod a+r /var/www/treebird +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 +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} +# In case the folders do not exist yet, do the following +sudo mkdir -p /etc/nginx/sites-{available,enabled} - # If you needed the above, ensure you also you have `include sites-enabled/*;` - # in the http section of `/etc/nginx/nginx.conf` +# If you needed the above, ensure you also you have `include sites-enabled/*;` +# in the http section of `/etc/nginx/nginx.conf` - # First edit treebird.nginx to replace treebird.example.com with your treebird hostname - sudo cp treebird.nginx /etc/nginx/sites-available/treebird.nginx - sudo ln -s /etc/nginx/{sites-available,sites-enabled}/treebird.nginx +# First edit treebird.nginx to replace treebird.example.com with your treebird hostname +sudo cp treebird.nginx /etc/nginx/sites-available/treebird.nginx +sudo ln -s /etc/nginx/{sites-available,sites-enabled}/treebird.nginx - # Activate SSL for domain (the usual... select domain and etc.) - sudo certbot --nginx +# Activate SSL for domain (the usual... select domain and etc.) +sudo certbot --nginx - # Start nginx - sudo systemctl start nginx +# Start nginx +sudo systemctl start nginx ``` It should now be running on the domain you configured. @@ -100,33 +99,33 @@ This is process is similar to the install, but without the need for config chang 2. Stop the running container and remove the old image ``` - docker stop treebird - docker rmi treebird:latest +docker stop treebird +docker rmi treebird:latest ``` 3. Load the new one ``` - docker load -i treebird-latest-HASH.tar.gz +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" +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 +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