Using environment variables to set settings ~(does not work properly)~ error in documentation
See original GitHub issueI used the following Dockerfile to build an image of my streamlit app:
FROM continuumio/miniconda3:latest
WORKDIR /app
COPY . /app/
RUN conda config --add channels conda-forge \
&& conda env create -n myapp -f environment.yml \
&& rm -rf /opt/conda/pkgs/*
ENV STREAMLIT_CONFIG_SERVER_PORT=8050
CMD conda run -n myapp streamlit run app.py
However, if I try to use port forwarding to access the container, then port 8050 does not work. Conversely, if I use --server.port=8050
in the last line, it does work.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Office error “could not create the work file” - Microsoft Learn
Add an Environment Variable · Select Start > Settings > System > About. · Scroll down to Related settings, and then select Advanced...
Read more >How to setup environment variables for `flask run` on Windows?
I don't know how to setup the environment variables. Whenever I use the flask run command, I encounter the following error: Error message...
Read more >Introduction to environment variables - CircleCI
Use environment variables to set up various configuration options, and keep your set-up secure with secrets, private keys, and contexts.
Read more >Environment variables in Compose | Docker Documentation
When you run docker-compose up with this configuration, Compose looks for the POSTGRES_VERSION environment variable in the shell and substitutes its value in....
Read more >How to Use Environment Variables in App Platform
To set a bindable variable as an environment variable, go to the Apps section of the DigitalOcean Control Panel. Click your app, then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just confirming: the line of code pertaining to the syntax of env variables is here in
cli.py
:Extremely small point to anyone coming here (as I did) to see how to set a config option via an environment variable:
Don’t forget to include the config section name in the environment variable name! For example:
export STREAMLIT_RUNNER_MAGIC_ENABLED = "False"
i.e. “RUNNER” here is the same as the “[runner]” section name in the .toml file. This must be included, otherwise the environment variable will be ignored / the config option will not be set.