Giter Club home page Giter Club logo

Comments (6)

matejkramny avatar matejkramny commented on May 21, 2024

Fair point, and shouldn't be too hard..
It will probably be done at the same time as the UI upgrade (feature/ui-work branch).

from semaphore.

benwyrosdick avatar benwyrosdick commented on May 21, 2024

👍

from semaphore.

bibby avatar bibby commented on May 21, 2024

IMO, this is only partly done. The default values for the environment variables only come into play in the presence of the config json file you are trying to remove. Default env vars should be present in the Dockerfile as an indicator for users who wish to override them.

For example

ENV REDIS_HOST 127.0.0.1
ENV REDIS_PORT 6379

from semaphore.

matejkramny avatar matejkramny commented on May 21, 2024

@bibby Check out https://github.com/ansible-semaphore/semaphore/blob/master/lib/config.js#L7

The program is runnable w/o configuration files.

from semaphore.

bibby avatar bibby commented on May 21, 2024

The line you have linked tests for the absence of environment variables. The defaults are then loaded from the configuration file. So in that way, no, it cannot run w/o config files.

Using ENV in the dockerfile with a default value means the required value is never absent, being either a user defined value or the predefined default.

from semaphore.

matejkramny avatar matejkramny commented on May 21, 2024
  1. Tries to load configuration file
  2. If not present, tests for some required env variables. If they're not present, the program cannot run
  3. Load default configuration
  4. (line 17-21) Overrides configuration from environment

from semaphore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.