eintopf.info@v0.13.16/DEPLOYMENT.md (about)

     1  # Deployment
     2  
     3  ## Environment variables
     4  
     5  \* mandatory
     6  
     7  | ENV | Default | Example | Description |
     8  | -------------------------------- | ----------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
     9  | EINTOPF_SQLITE_DB\* | eintopf.db | eintopf.db | Path pointing to the sqlite database file |
    10  | EINTOPF_ADDR | 3333 | 3333 | Http listen address |
    11  | EINTOPF_HTTP_READ_TIMEOUT | 5s | 10s | Http read timeout |
    12  | EINTOPF_HTTP_WRITE_TIMEOUT | 5s | 10s | Http write timeout |
    13  | EINTOPF_HTTP_HANDLER_TIMEOUT | 5s | 10s | Http hanlder timeout |
    14  | EINTOPF_AUTH_KEY_PATH | auth-key | /var/lib/eintopf/auth-key | Path pointing to the private key used by the auth service. It also expects a public key at {EINTOPF_AUTH_KEY_PATH}.pub |
    15  | EINTOPF_SEARCH_INDEX_PATH\* | index.bleve | /var/lib/eintopf/index.bleve | Path pointing bleve index |
    16  | EINTOPF_SEARCH_TIMEOUT | 10s | 1s | Maximum duration for a search request |
    17  | EINTOPF_SEARCH_RESULT_CACHE_SIZE | 100 | 10 | Number of search results cached |
    18  | EINTOPF_SEARCH_BUCKET_CACHE_SIZE | 100 | 10 | Number of search bucket cached |
    19  | EINTOPF_ADMIN_EMAIL | | myadmin | Admin email address, used to generate an admin user, if it does not exist |
    20  | EINTOPF_ADMIN_PASSWORD | | mypassword | Admin password, used to generate an admin user, if it does not exist |
    21  | EINTOPF_KILLSWITCH_HASHES\* | | foo,bar | List of strings, that can be used to stop the eintopf server with an http request |
    22  | EINTOPF_MEDIA_PATH\* | | /var/lib/eintopf/media | Path pointing to a directory, where all media files are uploaded to |
    23  | EINTOPF_BASE_URL\* | | https://eintopf.info | Base url, used for linking to the frontend from the server |
    24  | EINTOPF_TIMEZONE | UTC | Europe/Berlin | Time zone used in eintopf |
    25  | EINTOPF_THEMES | eintopf | eintopf,/var/lib/eintopf/themes/foo | List of themes. A theme can either be a bundeled theme (eintopf) or a path on the filessystem. The last theme has the highest priority. |
    26  | EINTOPF_PLAUSIBLE_HOST | | https://plausible.io | Host of the plausible server for analytics |
    27  | EINTOPF_PLAUSIBLE_DOMAIN | | eintopf.info | Domain for plausible analytics |
    28  | EINTOPF_OSM_TILE_SERVER | | https://tile.openstreetmap.org/{z}/{x}/{y}.png | Open Street Map tile server |
    29  | EINTOPF_OSM_TILE_CACHE_DIR | | /var/lib/eintopf/osm | Cache Directory for Open Street Map tiles |
    30  
    31  ## Custom Themes
    32  
    33  Currently there is one bundeled theme (`eintopf`), which is also the default one. It is possible to define custom themes by using the `EINTOPF_THEMES` environment variable. `EINTOPF_THEMES` takes a list of themes which is either the bundeled theme (`eintopf`) or a path on the filesystem. When specifying multiple themes, each next theme overrides the previous one with the last one taking the highest priority.
    34  
    35  **Example:**
    36  
    37  ```
    38  EINTOPF_THEMES=eintopf,/path/to/my/custom/theme
    39  ```
    40  
    41  ### Custom Sitename
    42  
    43  ```
    44  # /path/to/my/custom/theme/templates/globals.tpl
    45  
    46  
    47  {{ define "sitename" }}Custom Site Name{{ end }}
    48  ```
    49  
    50  ## Building docker images              
    51  ### Enable multi platform builds in docker
    52  ```bash
    53  docker run --rm --privileged multiarch/qemu-user-static --reset -p yes	
    54  docker buildx create --name eintopf
    55  docker buildx use eintopf
    56  docker buildx inspect --bootstrap          
    57  ```
    58  ### Build and push image local
    59  ```bash
    60  make image-build
    61  make image-push
    62  ```
    63  #### How it works
    64  The naming pattern of the docker image is the `GIT_TAG-ARCHITECTURE`. The architecture is generated by the `PLATFORMS` variable in the Makefile. The git tag is found by using in the Makefile:
    65  ```bash
    66  git describe --tags
    67  ```
    68  For building all images with one command the Makefile uses the make foreach function to loop over the platforms.
    69  We currently only build for linux platforms so the content before the `/` is irrelevant.