apache / apache/couchdb

Docker add environment variable for mode

Open
#4,742 0 comments 0 reactions 0 assignees View on GitHub
beginner-friendly enhancement feature patches-welcome
Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
1d 16h
Merged PRs (30d)
9

Description

[NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ )

## Summary

On your docker hub site you mentioned in the Caveats section the following: `Please note that CouchDB no longer autocreates system databases for you, as it is not known at startup time if this is a single-node or clustered CouchDB installation`. With an environment variable this could be done. right?

[NOTE]: # ( Provide a brief overview of what the new feature is all about. )

## Desired Behaviour

Make it possible to define the mode via an environment variable like this:

```shell
docker run -e COUCHDB_MODE=SINGLE|CLUSTERED -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password couchdb
```

[NOTE]: # ( Tell us how the new feature should work. Be specific. )
[TIP]: # ( Do NOT give us access or passwords to your actual CouchDB! )

## Possible Solution

[NOTE]: # ( Not required. Suggest how to implement the addition or change. )
Adapt the dockerfile to create the required databases for single mode if the environment variable `SINGLE` is present.

## Additional context

This feature matters to me so that newcomers have a easier time setting up couchdb.

[TIP]: # ( Why does this feature matter to you? What unique circumstances do you have? )

Contributor guide

Open the contributing guide

Research direction

Review the Dockerfile and the CouchDB image startup path to see how environment variables and system database creation are handled. Add support for COUCHDB_MODE=SINGLE or CLUSTERED, then verify with docker run that single mode creates the required databases while clustered mode does not.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, erlang
Domain
database, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.