chore: thoughts about self updating

main
Antonio De Lucreziis 10 months ago
parent 9d16fb5814
commit 9229342177

@ -15,7 +15,7 @@ $ pnpm dev
$ pnpm build $ pnpm build
``` ```
## Bootstrapping ## Production Setup
Run the following command to bootstrap a **phCD** instance. As this service doesn't have auth for now, it's strongly recommended to publish only on a local ip like `127.0.0.1` and then access directly or via an ssh tunnel (something like `ssh -L 8080:127.0.0.1:8080 server`). Run the following command to bootstrap a **phCD** instance. As this service doesn't have auth for now, it's strongly recommended to publish only on a local ip like `127.0.0.1` and then access directly or via an ssh tunnel (something like `ssh -L 8080:127.0.0.1:8080 server`).
@ -45,21 +45,21 @@ $ docker run -d \
### Updating ### Updating
```bash Just pull changes and update the docker image, then use the command from before to restart the main container.
$ git pull
$ docker stop phcd ```bash
$ docker built . -t phcd git pull
$ docker run -d \ docker stop phcd
--name phcd \ docker rm phcd
--restart unless-stopped \ docker built . -t phcd
-p 127.0.0.1:8080:4321 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./data.local:/app/data.local \
-v ./config.yaml:/app/config.yaml \
phcd
``` ```
### TODO: Self-Updating
It should be possible to deploy itself using a git+dockerfile deployment. For now this is more complicated as this requires to stop itself and spawn a new docker container of itself.
~~**Idea 1.** Create another `self-update.Dockerfile` that also gets mounted `/var/run/docker.sock`, this new container will then run the previous commands~~ [...] if we want the volume to be a folder this cannot be easily done
## Architecture ## Architecture
Everything is stored in the `config.yaml` file. This file contains a list of projects to deploy and the configuration for each one. Everything is stored in the `config.yaml` file. This file contains a list of projects to deploy and the configuration for each one.

Loading…
Cancel
Save