forked from coop-cloud/minio
Compare commits
No commits in common. "main" and "main" have entirely different histories.
20
.env.sample
20
.env.sample
@ -5,25 +5,5 @@ DOMAIN=minio.example.com
|
|||||||
#EXTRA_DOMAINS=', `www.minio.example.com`'
|
#EXTRA_DOMAINS=', `www.minio.example.com`'
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
|
|
||||||
COMPOSE_FILE=compose.yml
|
|
||||||
|
|
||||||
SECRET_SECRET_KEY_VERSION=v1 # length=20
|
SECRET_SECRET_KEY_VERSION=v1 # length=20
|
||||||
SECRET_ACCESS_KEY_VERSION=v1 # length=40
|
SECRET_ACCESS_KEY_VERSION=v1 # length=40
|
||||||
|
|
||||||
#######################
|
|
||||||
##### OIDC CONFIG #####
|
|
||||||
#######################
|
|
||||||
|
|
||||||
##### Required
|
|
||||||
|
|
||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.postgres.yml"
|
|
||||||
#MINIO_IDENTITY_OPENID_CONFIG_URL=
|
|
||||||
#MINIO_IDENTITY_OPENID_CLIENT_ID=
|
|
||||||
#MINIO_IDENTITY_OPENID_CLIENT_SECRET=
|
|
||||||
|
|
||||||
##### Optional
|
|
||||||
|
|
||||||
#MINIO_IDENTITY_OPENID_CLAIM_NAME=
|
|
||||||
#MINIO_IDENTITY_OPENID_CLAIM_PREFIX=
|
|
||||||
#MINIO_IDENTITY_OPENID_SCOPES=
|
|
||||||
#MINIO_IDENTITY_OPENID_COMMENT=
|
|
@ -1,20 +0,0 @@
|
|||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
secrets:
|
|
||||||
- oidc_secret
|
|
||||||
environment:
|
|
||||||
- MINIO_IDENTITY_OPENID_CONFIG_URL
|
|
||||||
- MINIO_IDENTITY_OPENID_CLIENT_ID
|
|
||||||
- MINIO_IDENTITY_OPENID_CLIENT_SECRET
|
|
||||||
- MINIO_IDENTITY_OPENID_CLAIM_NAME
|
|
||||||
- MINIO_IDENTITY_OPENID_CLAIM_PREFIX
|
|
||||||
- MINIO_IDENTITY_OPENID_SCOPES
|
|
||||||
- MINIO_IDENTITY_OPENID_REDIRECT_URI
|
|
||||||
- MINIO_IDENTITY_OPENID_COMMENT
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
oidc_secret:
|
|
||||||
name: ${STACK_NAME}_oidc_secret_${SECRET_OIDC_SECRET_VERSION}
|
|
||||||
external: true
|
|
13
compose.yml
13
compose.yml
@ -3,7 +3,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: minio/minio:RELEASE.2025-02-07T23-21-09Z
|
image: minio/minio:RELEASE.2022-10-24T18-35-07Z
|
||||||
volumes:
|
volumes:
|
||||||
- minio-data:/export
|
- minio-data:/export
|
||||||
networks:
|
networks:
|
||||||
@ -34,12 +34,12 @@ services:
|
|||||||
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=1.0.0+RELEASE.2025-02-07T23-21-09Z"
|
- "coop-cloud.${STACK_NAME}.version=1.0.0+RELEASE.2022-10-24T18-35-07Z"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "mc", "ready", "local" ]
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||||
interval: 5s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 20s
|
||||||
retries: 5
|
retries: 3
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
@ -48,7 +48,6 @@ networks:
|
|||||||
volumes:
|
volumes:
|
||||||
minio-data:
|
minio-data:
|
||||||
|
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
secret_key:
|
secret_key:
|
||||||
external: true
|
external: true
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
|
|
||||||
if [ -f /run/secrets/oidc_secret ]; then
|
|
||||||
export MINIO_IDENTITY_OPENID_CLIENT_SECRET=$(cat /run/secrets/oidc_secret)
|
|
||||||
else
|
|
||||||
echo "OIDC secret not found, skipping."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# If command starts with an option, prepend minio.
|
|
||||||
if [ "${1}" != "minio" ]; then
|
|
||||||
if [ -n "${1}" ]; then
|
|
||||||
set -- minio "$@"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker_switch_user() {
|
|
||||||
if [ -n "${MINIO_USERNAME}" ] && [ -n "${MINIO_GROUPNAME}" ]; then
|
|
||||||
if [ -n "${MINIO_UID}" ] && [ -n "${MINIO_GID}" ]; then
|
|
||||||
chroot --userspec=${MINIO_UID}:${MINIO_GID} / "$@"
|
|
||||||
else
|
|
||||||
echo "${MINIO_USERNAME}:x:1000:1000:${MINIO_USERNAME}:/:/sbin/nologin" >>/etc/passwd
|
|
||||||
echo "${MINIO_GROUPNAME}:x:1000" >>/etc/group
|
|
||||||
chroot --userspec=${MINIO_USERNAME}:${MINIO_GROUPNAME} / "$@"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
exec "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
## DEPRECATED and unsupported - switch to user if applicable.
|
|
||||||
docker_switch_user "$@"
|
|
Loading…
x
Reference in New Issue
Block a user