Start stacking

Changes to the examples

Images

The tags

Configuration

The application supports the following environment variables:

  • POSTGRES_HOST (v5 and higher): The hostname of the machine or container that runs the PostgreSQL database. The app will try to connect to this host.
  • POSTGRES_DB (v5 and higher): The database name that will be used. Make sure that the database exists.
  • POSTGRES_USER (v5 and higher): The username that will be used to connect to the PostgreSQL database.
  • POSTGRES_PASSWORD (v5 and higher): The password that is used to connect to the PostgreSQL database. The default is no password.
  • POSTGRES_PASSWORD_FILE (v8 and higher): The path to the file containing the password to connect to the PostgreSQL database. This can be used in combination with Docker Secrets.
  • NUMBER_OF_REQUESTS (v9 and higher): Controls the number of requests that will be shown on the homepage.
  • MIN_REQUESTS_TILL_DEATH (v10 only): The minimum number of health checks that will succeed.
  • MAX_REQUESTS_TILL_DEATH (v10 only): The maximum number of health checks that will succeed.

Please make sure to set the POSTGRES_PASSWORD environment variable if you are using a version < v8.

The files

  • All the files can be found in this GitHub repository
  • You can also download an archive with all files from here

Replication mode

Resilient applications