Question:
How to configure Stoplight Runtime?
Answer:
Configuration Options
Front-End
SL_API_URL (required)
The SL_API_URL option tells Stoplight components and clients where the Stoplight is accessible from. This configuration option should be set to the full URL of the Stoplight API.
SL_API_URL=http://stoplight.myorg.com:1234/api
When running in Docker, this value defaults to "http://localhost:8080/api" but should be set explicitly when running remotely.
SL_MOCKS_URL
The SL_MOCKS_URL option is where the URL for the mocks service. If not set, this defaults to the front-end server under a "/mocks" base path. If you are running Stoplight from RPM, you'll want to set this to the URL of the mocks server explicitly.
SL_MOCKS_URL=http://stoplight-mocks.myorg.com:4080
Back-End
SL_POSTGRES_URL (required)
The SL_POSTGRES_URL option tells Stoplight which PostgreSQL database to use for storing data. This configuration option should be set to the full URL of the PostgreSQL database.
SL_POSTGRES_URL=postgres://username:password@postgres.example.com:5432/stoplight
SL_APP_SECRET (required)
The SL_APP_SECRET option is used encrypting sessions and other secrets stored in the Stoplight database.
SL_APP_SECRET=myreallyquitelongsuperdupersecretvalue
When running in Docker, this value is automatically-generated (if not otherwise set) and is persisted to the filesystem under the PostgreSQL data directory under the file name "SL_APP_SECRET". Be sure to store and backup this value when moving into a production environment.
Since this value is used to encrypt data, it is crucial that it not be lost. If it is lost, all external services will have to be reconfigured and all connected VCS accounts must reconnected.
SL_EXPORT_API_URL (required)
The SL_EXPORT_API_URL option tells the back-end service which URL to use when connecting to the export service.
SL_EXPORT_API_URL=http://localhost:4061
Mocks
STOPLIGHT_API_BASE_URL (required)
The STOPLIGHT_API_BASE_URL option tells the mock service which URL to use when connecting to the Stoplight back-end service.
STOPLIGHT_API_BASE_URL=http://localhost:4060/api
URI_TEMPLATE (required)
The URI_TEMPLATE option tells the mocks server how to handle incoming requests.
URI_TEMPLATE=/{projectId}/{serviceNodeId}{/prismUrl*}
Export
SL_POSTGRES_URL (required)
The SL_POSTGRES_URL option tells Stoplight which PostgreSQL database to use for retrieving data. This configuration option should be set to the full URL of the PostgreSQL database.
SL_POSTGRES_URL=postgres://username:password@postgres.example.com:5432/stoplight
Docker
DISABLE_IPV6
Note! This option is only supported when running in Docker.
The DISABLE_IPV6 option can be used to disallow the embedded nginx process from binding on an IPv6-based interface. Valid values: true, false
DISABLE_IPV6=false
EMIT_STDOUT
Note! This option is only supported when running in Docker.
The EMIT_STDOUT option is used to redirect process logs to stdout. Valid values: true, false
EMIT_STDOUT=true
SL_ENABLE_SSL
Note! This option is only supported when running in Docker.
The SL_ENABLE_SSL option is used to enable SSL. Valid values: true, false
SL_ENABLE_SSL=false
For more information on configuring SSL, please see here.
SL_HOSTNAME
Note! This option is only supported when running in Docker.
The SL_HOSTNAME option is used for setting the hostname that nginx will use when receiving requests. This should be used along with SL_ENABLE_SSL to ensure that the hostname being used to serve Stoplight gets connected with the appropriate SSL certificate.
SL_HOSTNAME=stoplight.example.com
SUPERVISOR_RPC_DISABLED
Note! This option is only supported when running in Docker.
The SUPERVISOR_RPC_DISABLED option can be used to disable the embedded Supervisor process RPC endpoint, which is helpful for debugging purposes.
SUPERVISOR_RPC_DISABLED=false
All Services
NODE_EXTRA_CA_CERTS
The NODE_EXTRA_CA_CERTS option is used to include other TLS CA (or self-signed) certificates.
NODE_EXTRA_CA_CERTS=/etc/nginx/custom-certificates/fullchain.pem
Comments
0 comments
Please sign in to leave a comment.