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`).
```bash
$ git clone https://git.phc.dm.unipi.it/phc/phcd
$ docker built . -t phcd
$ echo 'deploys: []' > config.yaml
$ cp .env.sample .env
$ docker run -d \
--name phcd \
--restart unless-stopped \
-p 127.0.0.1:8080:4321 \
-v ./data.local:./data.local \
-v ./config.yaml:./config.yaml \
phcd
```
### Updating
```bash
$ git pull
$ docker stop phcd
$ docker built . -t phcd
$ docker run -d \
--name phcd \
--restart unless-stopped \
-p 127.0.0.1:8080:4321 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./config.yaml:/app/config.yaml \
phcd
```
## Architecture
Everything is stored in the `config.yaml` file. This file contains a list of projects to deploy and the configuration for each one.