Skip to content

Commit

Permalink
Merge pull request #8 from sparkfabrik/feat/update_documentation
Browse files Browse the repository at this point in the history
feat: update README.md and add some documentation notes
  • Loading branch information
Monska85 authored Aug 2, 2024
2 parents 8ff9299 + 1f77a81 commit 0915f6c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ The `/scripts/entrypoint.sh` script is used to start the minio server. It is pos
| `MINIO_BROWSER` | If set to `on`, the minio browser is enabled. | `off` |
| `MINIO_CONSOLE_PORT` | The port used by the minio console. | `9001` |
| `MINIO_OPTS` | Additional options to pass to the minio server. | `-` |

### Deprecated Variables

| Variable | Description |
| ------------------ | ------------------------------------------------------------------------------------------------- |
| `OSB_BUCKET` | The name of the bucket to create and populate at startup. **Use `BUCKET_NAME` instead.** |
| `MINIO_ACCESS_KEY` | The access key used to authenticate with the minio server. **Use `MINIO_ROOT_USER` instead.** |
| `MINIO_SECRET_KEY` | The secret key used to authenticate with the minio server. **Use `MINIO_ROOT_PASSWORD` instead.** |
15 changes: 8 additions & 7 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ export MINIO_BROWSER=${MINIO_BROWSER:-"off"}
export MINIO_CONSOLE_PORT=${MINIO_CONSOLE_PORT:-"9001"}
export MINIO_OPTS=${MINIO_OPTS:-""}

# Backward compatibility for OSB_BUCKET.
# If `BUCKET_NAME` variable is not set, then `OSB_BUCKET` variable is used to set `BUCKET_NAME`.
if [ -z "${BUCKET_NAME}" ] && [ -n "${OSB_BUCKET}" ]; then
export BUCKET_NAME="${OSB_BUCKET}"
fi

# Backward compatibility for MINIO_ACCESS_KEY and MINIO_SECRET_KEY.
# The variables are overwritten if MINIO_ROOT_USER and MINIO_ROOT_PASSWORD are not set.
# If `MINIO_ROOT_USER` variable is not set, then `MINIO_ACCESS_KEY` variable is used to set `MINIO_ROOT_USER`.
# If `MINIO_ROOT_PASSWORD` variable is not set, then `MINIO_SECRET_KEY` variable is used to set `MINIO_ROOT_PASSWORD`.
if [ -z "${MINIO_ROOT_USER}" ] && [ -n "${MINIO_ACCESS_KEY}" ]; then
export MINIO_ROOT_USER="${MINIO_ACCESS_KEY}"
fi
Expand All @@ -23,12 +30,6 @@ if [ -z "${MINIO_ROOT_PASSWORD}" ] && [ -n "${MINIO_SECRET_KEY}" ]; then
export MINIO_ROOT_PASSWORD="${MINIO_SECRET_KEY}"
fi

# Backward compatibility for OSB_BUCKET.
# The variable is overwritten if BUCKET_NAME is not set.
if [ -z "${BUCKET_NAME}" ] && [ -n "${OSB_BUCKET}" ]; then
export BUCKET_NAME="${OSB_BUCKET}"
fi

# Check required environment variables
if [ -z "${BUCKET_NAME}" ]; then
minio_error "BUCKET_NAME environment variable is required."
Expand Down

0 comments on commit 0915f6c

Please sign in to comment.