-
Notifications
You must be signed in to change notification settings - Fork 0
deploy: collapse to single .env, make updater token optional for main app #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,75 @@ | ||
| # ProcessGit deployment environment. | ||
| # ProcessGit deployment configuration — single source of truth. | ||
| # | ||
| # Copy this file to ../.env (one level above deploy/) and fill in the values. | ||
| # All variables marked `(required)` MUST be set; the others can be left blank | ||
| # to accept defaults. | ||
| # Copy this file to deploy/.env and edit. Docker Compose reads it | ||
| # automatically for variable substitution AND the running containers | ||
| # receive it via env_file. There is no second .env file at the project | ||
| # root; everything operator-facing lives here. | ||
| # | ||
| # Generate the bearer token once: | ||
| # openssl rand -hex 32 | ||
| # | ||
| # Then either: | ||
| # - Paste it into PROCESSGIT_UPDATER_TOKEN= below, or | ||
| # - Run: echo "PROCESSGIT_UPDATER_TOKEN=$(openssl rand -hex 32)" >> ../.env | ||
| # After editing: | ||
| # docker compose -f deploy/docker-compose.yml up -d | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # REQUIRED | ||
| # ----------------------------------------------------------------------------- | ||
| # ============================================================================= | ||
| # Self-update sidecar (recommended; can be skipped — see below) | ||
| # ============================================================================= | ||
|
|
||
| # Shared bearer token between the main ProcessGit app and the updater sidecar. | ||
| # 64 hex chars = 32 bytes of entropy. Both containers read this from .env. | ||
| # (required) | ||
| # Shared bearer token between the main app and the updater sidecar. | ||
| # 64 hex chars = 32 bytes of entropy. | ||
| # | ||
| # Required ONLY if you run the processgit-updater service. The main app | ||
| # starts fine without it; you just won't have in-product self-updates. | ||
| # | ||
| # Generate with: | ||
| # openssl rand -hex 32 | ||
| # | ||
| # Or append directly: | ||
| # echo "PROCESSGIT_UPDATER_TOKEN=$(openssl rand -hex 32)" >> deploy/.env | ||
| PROCESSGIT_UPDATER_TOKEN= | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # VERSION CONTROL | ||
| # ----------------------------------------------------------------------------- | ||
|
|
||
| # Pin the ProcessGit image version. The updater rewrites this line when a | ||
| # release is committed via the in-product UI, so the next `docker compose up` | ||
| # reuses the same version after a host restart. | ||
| # Defaults to `latest` if unset, which moves on every stable release — | ||
| # acceptable for evaluation but not recommended for production. | ||
| # Image version pin. The updater rewrites this line on a successful update | ||
| # so the new version persists across host restarts. Leave at "latest" if | ||
| # you're happy moving on every stable release, or pin to a specific | ||
| # X.Y.Z for change-controlled deployments. | ||
| PROCESSGIT_VERSION=latest | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # UPDATER CONFIG (optional) | ||
| # ----------------------------------------------------------------------------- | ||
|
|
||
| # GitHub repository the updater polls for releases. | ||
| # GitHub repository the updater polls for new releases. Override if | ||
| # you've forked. | ||
| PROCESSGIT_UPDATER_REPO=Algomation-AI/ProcessGit | ||
|
|
||
| # Slice 3A stub mode. The updater simulates the docker operations rather | ||
| # than actually pulling/swapping containers. Default true while the docker | ||
| # operations harden in Slice 3B. | ||
| # Flip to `false` once Slice 3B (real docker calls) is merged AND you've | ||
| # tested a stub-mode update flow end-to-end. | ||
| # Stub mode. While true, the updater simulates docker operations rather | ||
| # than actually pulling/swapping. Default true until you've validated | ||
| # the architecture end-to-end against your deployment. Flip to "false" | ||
| # to enable real updates. | ||
| PROCESSGIT_UPDATER_STUB=true | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # PROCESSGIT APP CONFIG (passed through env_file to the main container) | ||
| # ----------------------------------------------------------------------------- | ||
|
|
||
| # Add any APP_* / GITEA_* / PROCESSGIT_* settings you want passed to the | ||
| # main app container here. See: | ||
| # ============================================================================= | ||
| # ProcessGit app config (passed through to the main container) | ||
| # ============================================================================= | ||
| # | ||
| # Any Gitea/ProcessGit configuration env vars can go here. The main | ||
| # container receives this file via env_file, so every key=value pair | ||
| # becomes an env var inside the container. See: | ||
| # https://docs.gitea.com/installation/install-with-docker | ||
| # for the available config keys (ProcessGit inherits Gitea's config surface). | ||
|
|
||
| # Example: | ||
| # APP_NAME=ProcessGit | ||
| # | ||
| # Some common ones: | ||
| # | ||
| # DOMAIN=processgit.example.com | ||
| # SSH_PORT=12222 | ||
| # SSH_DOMAIN=processgit.example.com | ||
| # ROOT_URL=https://processgit.example.com/ | ||
| # APP_NAME=ProcessGit | ||
| # DISABLE_REGISTRATION=true | ||
|
|
||
| # ============================================================================= | ||
| # Opting out of the self-update sidecar | ||
| # ============================================================================= | ||
| # | ||
| # If you don't want the updater (e.g. you have change-control processes, | ||
| # or you prefer to update manually): leave PROCESSGIT_UPDATER_TOKEN | ||
| # blank above, and at `up` time list only the services you want: | ||
| # | ||
| # docker compose -f deploy/docker-compose.yml up -d \ | ||
| # processgit-init-perms processgit processgit-bootstrap | ||
| # | ||
| # The main app starts identically — you just won't have in-product | ||
| # self-updates. You can always opt back in later by setting the token | ||
| # and running: | ||
| # docker compose -f deploy/docker-compose.yml up -d processgit-updater |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
${PROCESSGIT_UPDATER_TOKEN:?...}here breaks the advertised “run without updater” flow, because Compose resolves variable interpolation across the Compose model before service selection; a missing required variable aborts parsing even whenuptargets onlyprocessgit-init-perms processgit processgit-bootstrap. In practice,docker compose -f deploy/docker-compose.yml up -d processgit-init-perms processgit processgit-bootstrapwill still fail unless a token is set, so the new optional-token behavior for the main app is not actually reachable.Useful? React with 👍 / 👎.