[{"data":1,"prerenderedAt":556},["ShallowReactive",2],{"navigation-en":3,"/en/operation/installation-en":46,"/en/operation/installation-en-surround":551},[4,8,12,38,42],{"title":5,"path":6,"stem":7},"Overview","/en","en/0.index",{"title":9,"path":10,"stem":11},"Quick start","/en/getting-started/self-hosting","en/1.getting-started/1.self-hosting",{"title":13,"path":14,"stem":15,"children":16},"Operation","/en/operation","en/2.operation/0.index",[17,18,22,26,30,34],{"title":13,"path":14,"stem":15},{"title":19,"path":20,"stem":21},"Installation","/en/operation/installation","en/2.operation/1.installation",{"title":23,"path":24,"stem":25},"Email delivery","/en/operation/mail","en/2.operation/2.mail",{"title":27,"path":28,"stem":29},"Documents","/en/operation/documents","en/2.operation/3.documents",{"title":31,"path":32,"stem":33},"Accounts and roles","/en/operation/accounts-and-roles","en/2.operation/4.accounts-and-roles",{"title":35,"path":36,"stem":37},"Separate hosts","/en/operation/separate-hosts","en/2.operation/5.separate-hosts",{"title":39,"path":40,"stem":41},"Sign-in","/en/sign-in","en/3.sign-in",{"title":43,"path":44,"stem":45},"Backend API v1","/en/api","en/4.api",{"id":47,"title":19,"body":48,"description":545,"extension":546,"links":547,"meta":548,"navigation":547,"path":20,"seo":549,"stem":21,"__hash__":550},"en/en/2.operation/1.installation.md",{"type":49,"value":50,"toc":535},"minimark",[51,56,68,128,139,143,256,262,266,275,278,301,305,319,328,338,355,359,366,381,400,413,417,432,436,451,458,462,481,513,531],[52,53,55],"h2",{"id":54},"images-and-versions","Images and versions",[57,58,59,63,64,67],"p",{},[60,61,62],"code",{},"BEANTRAGT_VERSION"," in ",[60,65,66],{},".env"," sets the release tag of the four images from the GitHub Container Registry.",[69,70,71,84],"table",{},[72,73,74],"thead",{},[75,76,77,81],"tr",{},[78,79,80],"th",{},"Image",[78,82,83],{},"Content",[85,86,87,98,108,118],"tbody",{},[75,88,89,95],{},[90,91,92],"td",{},[60,93,94],{},"ghcr.io/civicpatches/beantragt",[90,96,97],{},"Drupal backend with PHP-FPM",[75,99,100,105],{},[90,101,102],{},[60,103,104],{},"ghcr.io/civicpatches/beantragt-nginx",[90,106,107],{},"nginx with the web root of the Drupal build",[75,109,110,115],{},[90,111,112],{},[60,113,114],{},"ghcr.io/civicpatches/beantragt-ui-base",[90,116,117],{},"Interface with the citizen portal and casework",[75,119,120,125],{},[90,121,122],{},[60,123,124],{},"ghcr.io/civicpatches/beantragt-docgen",[90,126,127],{},"Document service",[57,129,130,131,134,135,138],{},"The bundled ",[60,132,133],{},".env.example"," already contains the release tag. The images on GHCR are immutable release snapshots without ongoing maintenance. An own build allows the images to be maintained continuously. The MariaDB, ClamAV, Mailpit, Gotenberg and veraPDF images are pinned by digest in ",[60,136,137],{},"compose.yaml",".",[52,140,142],{"id":141},"configuration-in-env","Configuration in .env",[69,144,145,155],{},[72,146,147],{},[75,148,149,152],{},[78,150,151],{},"Variable",[78,153,154],{},"Meaning",[85,156,157,169,186,213,227,237],{},[75,158,159,163],{},[90,160,161],{},[60,162,62],{},[90,164,165,166],{},"Release tag in the format ",[60,167,168],{},"vX.Y.Z",[75,170,171,176],{},[90,172,173],{},[60,174,175],{},"BEANTRAGT_EXAMPLE_DATA",[90,177,178,181,182,185],{},[60,179,180],{},"1"," creates the sample municipality of Musterstadt on first startup, ",[60,183,184],{},"0"," starts without sample data",[75,187,188,200],{},[90,189,190,193,194,193,197],{},[60,191,192],{},"UI_PORT",", ",[60,195,196],{},"DRUPAL_PORT",[60,198,199],{},"MAIL_PORT",[90,201,202,203,193,206,209,210],{},"Host ports, defaults ",[60,204,205],{},"13000",[60,207,208],{},"18080"," and ",[60,211,212],{},"18025",[75,214,215,220],{},[90,216,217],{},[60,218,219],{},"NUXT_PUBLIC_SOURCE_URL",[90,221,222,223,226],{},"Target of the source code link, ",[60,224,225],{},"{version}"," is replaced by the tag",[75,228,229,234],{},[90,230,231],{},[60,232,233],{},"UI_SOURCE_DIR",[90,235,236],{},"Folder of the UI sources when building from source",[75,238,239,253],{},[90,240,241,193,244,193,247,193,250],{},[60,242,243],{},"UI_PUBLIC_URL",[60,245,246],{},"DRUPAL_PUBLIC_URL",[60,248,249],{},"DRUPAL_TRUSTED_HOST",[60,251,252],{},"DRUPAL_REVERSE_PROXY_ADDRESSES",[90,254,255],{},"Operation behind a TLS proxy",[57,257,258,259,138],{},"The mail variables are described under ",[260,261,23],"a",{"href":24},[52,263,265],{"id":264},"startup-without-sample-data","Startup without sample data",[57,267,268,271,272,138],{},[60,269,270],{},"BEANTRAGT_EXAMPLE_DATA=0"," is set before the first startup. An already initialised database keeps its content. To start over after a test, required data is backed up and the volumes are deleted with ",[60,273,274],{},"docker compose down --volumes",[57,276,277],{},"On an empty installation, the one-time link to the Drupal administration is generated from the local shell. With a different Drupal port, the URL is adjusted.",[279,280,285],"pre",{"className":281,"code":282,"language":283,"meta":284,"style":284},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","docker compose exec drupal sh /opt/selfhost/start-drupal.sh \\\n  drush user:login --no-browser --uri=http://localhost:18080\n","sh","",[60,286,287,295],{"__ignoreMap":284},[288,289,292],"span",{"class":290,"line":291},"line",1,[288,293,294],{},"docker compose exec drupal sh /opt/selfhost/start-drupal.sh \\\n",[288,296,298],{"class":290,"line":297},2,[288,299,300],{},"  drush user:login --no-browser --uri=http://localhost:18080\n",[52,302,304],{"id":303},"building-from-source","Building from source",[57,306,307,308,311,312,314,315,318],{},"The backend and UI sources of the same release version are placed side by side. By default, the UI folder ",[60,309,310],{},"ui"," is expected next to the backend folder. ",[60,313,233],{}," is resolved relative to ",[60,316,317],{},"deploy/selfhost",". The build requires BuildKit and access to the package registries.",[279,320,322],{"className":281,"code":321,"language":283,"meta":284,"style":284},"docker compose -f compose.yaml -f compose.build.yaml up -d --build --wait --wait-timeout 300\n",[60,323,324],{"__ignoreMap":284},[288,325,326],{"class":290,"line":291},[288,327,321],{},[57,329,330,333,334,337],{},[60,331,332],{},"compose.build.yaml"," builds Drupal, nginx, Docgen and the interface locally. The interface is built with the build scope ",[60,335,336],{},"casework"," and therefore includes the open casework.",[57,339,340,341,344,345,347,348,354],{},"On hosts with many Docker networks, automatic subnet allocation can fail. Fixed subnets for the three networks are then defined in ",[60,342,343],{},"compose.override.yaml"," next to ",[60,346,137],{},". The ",[260,349,353],{"href":350,"rel":351},"https://github.com/civicpatches/beantragt/blob/v0.7.2/deploy/selfhost/README.md",[352],"nofollow","self-hosting guide"," contains an example.",[52,356,358],{"id":357},"tls-and-reverse-proxy","TLS and reverse proxy",[57,360,361,362,365],{},"In production, a reverse proxy terminates TLS. It redirects HTTP to HTTPS, passes the public host name and sets ",[60,363,364],{},"X-Forwarded-Proto: https",". Incoming forwarded headers are overwritten at the proxy. The Compose ports stay on loopback or in an isolated network.",[57,367,368,369,371,372,209,374,376,377,380],{},"The reverse proxy forwards exclusively to the user interface (",[60,370,192],{},"). Drupal and nginx are not published: the user interface reaches Drupal over the internal network, and all browser requests go through the user interface. In this setup ",[60,373,243],{},[60,375,246],{}," contain the same address. Sign-in with BundID is currently an exception: when it is enabled, the user interface sends the browser to the Drupal paths ",[60,378,379],{},"/auth/sso/*",", which the proxy then forwards to nginx. An upcoming release routes these paths through the user interface as well.",[57,382,383,209,385,387,388,390,391,393,394,397,398,138],{},[60,384,243],{},[60,386,246],{}," hold the external HTTPS base URLs, ",[60,389,249],{}," the host name of the Drupal base URL. ",[60,392,252],{}," holds a comma-separated list of the trusted peer addresses that nginx passes to Drupal. For session requests this is the address of the Nuxt container. With these settings, Drupal evaluates the forwarded HTTPS protocol and sets the session cookie with ",[60,395,396],{},"Secure",". A stack with an HTTPS interface does not start without ",[60,399,252],{},[57,401,402,403,405,406,409,410,412],{},"The installer stores ",[60,404,243],{}," on first startup as ",[60,407,408],{},"beantragt_group.settings:frontend_base_url",", the base for links in confirmation and invitation emails. On an existing installation, this value is updated manually after ",[60,411,243],{}," changes.",[52,414,416],{"id":415},"source-code-link-under-13-agpl","Source code link under § 13 AGPL",[57,418,419,420,209,422,424,425,428,429,431],{},"Compose passes ",[60,421,62],{},[60,423,219],{}," to the interface. The template ",[60,426,427],{},"https://github.com/civicpatches/beantragt-ui-base/tree/{version}"," leads to the source code of the installed tag. With an empty or invalid tag, the interface hides the link to the template. For a modified version, ",[60,430,219],{}," points to the complete source code of the version in use.",[52,433,435],{"id":434},"operational-check","Operational check",[279,437,439],{"className":281,"code":438,"language":283,"meta":284,"style":284},"curl --fail --silent --show-error http://localhost:18080/api/v1/auth/status\ndocker compose exec drupal curl --fail --silent --show-error http://docgen:3000/health\n",[60,440,441,446],{"__ignoreMap":284},[288,442,443],{"class":290,"line":291},[288,444,445],{},"curl --fail --silent --show-error http://localhost:18080/api/v1/auth/status\n",[288,447,448],{"class":290,"line":297},[288,449,450],{},"docker compose exec drupal curl --fail --silent --show-error http://docgen:3000/health\n",[57,452,453,454,457],{},"The document service health check reports ",[60,455,456],{},"status: ok"," with reachable Gotenberg and veraPDF instances.",[52,459,461],{"id":460},"updates","Updates",[57,463,464,465,468,469,471,472,474,475,477,478,480],{},"An update uses the source tree of the new release. The project name ",[60,466,467],{},"beantragt-selfhost"," is set in ",[60,470,137],{},", so the new source tree takes over the database, files and secrets from the existing volumes. ",[60,473,66],{}," and an existing ",[60,476,343],{}," are copied from the previous directory, and ",[60,479,62],{}," is set to the new release tag. A backup of the volumes before the update allows a return to the previous version.",[279,482,484],{"className":281,"code":483,"language":283,"meta":284,"style":284},"cd deploy/selfhost\ndocker compose pull\ndocker compose up -d --wait --wait-timeout 300\ndocker compose exec drupal sh /opt/selfhost/start-drupal.sh \\\n  drush updatedb --yes\n",[60,485,486,491,496,502,507],{"__ignoreMap":284},[288,487,488],{"class":290,"line":291},[288,489,490],{},"cd deploy/selfhost\n",[288,492,493],{"class":290,"line":297},[288,494,495],{},"docker compose pull\n",[288,497,499],{"class":290,"line":498},3,[288,500,501],{},"docker compose up -d --wait --wait-timeout 300\n",[288,503,505],{"class":290,"line":504},4,[288,506,294],{},[288,508,510],{"class":290,"line":509},5,[288,511,512],{},"  drush updatedb --yes\n",[57,514,515,518,519,522,523,526,527,530],{},[60,516,517],{},"drush updatedb"," runs the database updates of the modules and clears the caches afterwards. The start script initialises Drupal on first startup only and runs no database updates on later starts. Calling it through ",[60,520,521],{},"start-drupal.sh"," loads the container secrets. A process started directly with ",[60,524,525],{},"docker compose exec drupal drush"," does not receive them. For a source build, all three commands use the same ",[60,528,529],{},"-f"," options as the start. A configuration import is not part of an update: the configuration is created when the modules are installed and changes through their update hooks. Notes on individual releases are in the operating guide of the respective tag.",[532,533,534],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":284,"searchDepth":498,"depth":297,"links":536},[537,538,539,540,541,542,543,544],{"id":54,"depth":297,"text":55},{"id":141,"depth":297,"text":142},{"id":264,"depth":297,"text":265},{"id":303,"depth":297,"text":304},{"id":357,"depth":297,"text":358},{"id":415,"depth":297,"text":416},{"id":434,"depth":297,"text":435},{"id":460,"depth":297,"text":461},"Images and versions, configuration in .env, starting without sample data, building from source, TLS and updates.","md",null,{},{"title":19,"description":545},"0kS7VoGpazvJkJohz_3SXEFAkCktygcMnEDKhPlsZQk",[552,554],{"title":13,"path":14,"stem":15,"description":553,"children":-1},"Structure of the Compose package, services, ports and data of a self-hosted installation.",{"title":23,"path":24,"stem":25,"description":555,"children":-1},"Mailpit in the default setup, delivery through an existing SMTP server and redirection of all messages to a test mailbox.",1795601412415]