Skip to content
Snippets Groups Projects
Verified Commit 562745fc authored by anarcat's avatar anarcat
Browse files

fix environment passing (team#41257)

parent f45eae76
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ This is the actual command we use to *create* (not start!) the
container:
PASSWORD=$(tr -dc '[:alnum:]' < /dev/urandom | head -c 32)
echo "PASSWORD=$PASSWORD" > /etc/default/minio
echo "MINIO_ROOT_PASSWORD=$PASSWORD" > /etc/default/minio
chmod 600 /etc/default/minio
mkdir -p /srv/data
......@@ -106,7 +106,7 @@ container:
--publish 9090:9090 \
--volume /srv/data:/data \
--env "MINIO_ROOT_USER=root" \
--env "MINIO_ROOT_PASSWORD=$PASSWORD" \
--env "MINIO_ROOT_PASSWORD" \
quay.io/minio/minio server /data --console-address ":9090"
We store the password in a file because it will be used in a systemd
......@@ -114,7 +114,7 @@ unit. That could be done in Puppet instead.
This is how the systemd unit was generated:
podman generate systemd --new --name minio | sed 's/MINIO_ROOT_PASSWORD=[^ ]*/MINIO_ROOT_PASSWORD=$PASSWORD/' > /etc/systemd/system/container-minio.service
podman generate systemd --new --name minio | sed 's/MINIO_ROOT_PASSWORD=[^ ]*/MINIO_ROOT_PASSWORD=$PASSWORD/;s,Environment,EnvironmentFile=/etc/default/minio\nEnvironment,' > /etc/systemd/system/container-minio.service
Then the unit was enabled and started with:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment