Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8339715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:57:22+00:00 2026-06-09T04:57:22+00:00

I plan to store some application settings in environment variables, such as MYSQL_URL=mysql://… I

  • 0

I plan to store some application settings in environment variables, such as MYSQL_URL=mysql://… I use supervisord to manage the application process. How to load environment variables before the subprocess is started? Especially when these settings are changed, I hope a restart of the subprocess will load the new settings.

Also I’m wondering where to store these environment variables. A file that I can “export $(cat filename)”? Or some better ways. I’m curious how Heroku manage its environment variables.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:57:24+00:00Added an answer on June 9, 2026 at 4:57 am

    You can set per-process environment variables in the supervisord configuration in the [program:x] section, these will be passed to the process when it starts:

    [program:yourprocess]
    # ... other settings
    environment =
        MYSQL_URL=mysql://,
        OTHER_VAR="some other value"
    

    Note that you need to use a comma between each variable. I used newlines in the above example as well, those are optional. If you have spaces in your environment values you need to enclose the value in quotes.

    You can also set environment variables for all processes in the [supervisord] section, using the same format.

    Last but not least, any environment variables set when supervisord starts are passed on to the processes managed by supervisord too. See the documentation section on environment variables for details.

    Do note that if you change environment variables configured in the configuration file, you’ll need to signal to supervisord to reload the configuration and restart the subprocesses for them to pick up these changes:

    supervisorctl update
    supervisorctl restart yourprocess
    

    If however you change environment variables outside of supervisord, you’ll need to shut down supervisord all together to pick these up:

    supervisorctl shutdown
    supervisord
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application in which I plan to store some values
I am currently in the process of rewriting an application whereby teachers can plan
I am building an application which would store some information into the database and
I plan to store quite a few pieces of data about my users in
I have an options column which is serialized. I plan to store user preferences
I plan to host a site in a shared hosting environment, where multiple developers
we plan to use TIBCO EMS queues and TIBCO BW listeners on those queues
I have an application that currently stores timestamps in MySQL DATETIME and TIMESTAMP values.
I am facing some questions when trying to design an S3 application using ASP.NET
I want to use Git to store and version data efficiently, but I also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.