Main service of the StaticDeploy platform.
The service is distributed as a Docker image (staticdeploy/staticdeploy) that
can be run without modifications on docker-compose, ECS, Kubernetes, etc.
You can check the health status of the service via
GET $MANAGEMENT_HOSTNAME/api/health: the server will return a 200 if the
service is in a healthy status, a 503 otherwise. If the request is
authenticated, the (json) body of the response contains details about the health
status.
The following environment variables can be used to configure the server:
LOG_LEVEL(defaults toinfo)MANAGEMENT_HOSTNAME(required): the hostname at which the Management Console and API will be servedENABLE_MANAGEMENT_ENDPOINTS: whether to enable or not the Management Console and API. Defaults totrueMAX_REQUEST_BODY_SIZE: the max size of accepted request bodies, which mainly limits the size of (base64-encoded) bundles that can be uploaded. Defaults to100mb
HOSTNAME_HEADER: the header from which to retrieve the hostname of requests for static assets. By defaultHost- orX-Forwarded-Hostif present - are used. Some proxies however use other headers to pass the information upstream (example: Azure's Verizon CDN usesX-Host), so you can use this option to make StaticDeploy work behind such proxies
ENFORCE_AUTH:trueorfalse, determines whether authentication and authorization are enforced (i.e. requests must be authenticated, and the user performing the request must have the appropriate roles). Defaults totrueCREATE_ROOT_USER: on startup, create (if they don't already exist) arootuser and group with therootrole. Defaults totrueJWT_SECRET_OR_PUBLIC_KEY: by setting this config the JWT authentication strategy will be enabled. The config is the secret or public key (base64 encoded) to validate authorization JWT-sOIDC_CONFIGURATION_URL: by setting this config (and the following one) the OpenID Connect authentication strategy will be enabled. The config is the configuration url of the OpenID Connect provider (e.g.https://example.com/.well-known/openid-configuration)OIDC_CLIENT_ID: the client id of the OpenID Connect applicationOIDC_PROVIDER_NAME: the name to show in the "Login with" interface
When setting these config (all of them, save for S3_ENABLE_GCS_COMPATIBILITY,
which is optional), the pg-s3 storages module will be enabled (the memory one is
used otherwise):
POSTGRES_URL: connection string for the PostgreSQL databaseS3_BUCKET: name of the S3 bucket to use for storing static contentS3_ENDPOINT: endpoint of the S3 serverS3_ACCESS_KEY_ID: access key id for the S3 serverS3_SECRET_ACCESS_KEY: secret access key for the S3 serverS3_ENABLE_GCS_COMPATIBILITY:trueorfalse, enables compatibility with Google Cloud Storage, which doesn't support some S3 APIs. Defaults tofalse