| ... | ... | @@ -73,6 +73,39 @@ my development machine, for example, is Dell Inspiron 7348 with Core i7 |
| 73 | 73 | for unix systems, the provided `flake.nix` can be used with `nix develop` to |
| 74 | 74 | open a shell with all needed system dependencies. |
| 75 | 75 | |
| 76 | ## Deployment |
| 77 | |
| 78 | There are two primary server components to be deployed: the web server and the |
| 79 | sourth of truth server. The latter is a singleton that runs on Clover's NAS, |
| 80 | which holds the full contents of the file storage. The web server pulls data |
| 81 | from the source of truth and renders web pages, and can be duplicated to |
| 82 | multiple cloud hosts without issue. |
| 83 | |
| 84 | Deployment of the source of truth can be done with Docker Compose: |
| 85 | |
| 86 | services: |
| 87 | backend: |
| 88 | container_name: backend |
| 89 | build: |
| 90 | # this uses loopback to hit the self-hosted git server |
| 91 | context: http://localhost:3000/clo/sitegen.git |
| 92 | dockerfile: src/source-of-truth.dockerfile |
| 93 | environment: |
| 94 | # configuration |
| 95 | - PORT=43200 |
| 96 | - CLOVER_DB=/data |
| 97 | - CLOVER_FILE_RAW=/published |
| 98 | - CLOVER_FILE_DERIVED=/data/derived |
| 99 | - CLOVER_SOT_KEY=... # guards private/unreleased content |
| 100 | ports: |
| 101 | - '43200:43200' |
| 102 | restart: unless-stopped |
| 103 | volumes: |
| 104 | - /mnt/storage1/clover/Documents/Config/paperclover:/data |
| 105 | - /mnt/storage1/clover/Published:/published |
| 106 | |
| 107 | TODO: deployment instructions for a web node |
| 108 | |
| 76 | 109 | ## Contributions |
| 77 | 110 | |
| 78 | 111 | No contributions to `src` accepted, only `framework`. |