refactor: unify credential env constants and deploy env usage (#2821)

Co-authored-by: Henry Guo <marshawcoco@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: loverustfs <hello@rustfs.com>
Co-authored-by: 安正超 <anzhengchao@gmail.com>
This commit is contained in:
houseme
2026-05-06 12:30:29 +08:00
committed by GitHub
parent 090d60e00a
commit 3dd0692917
11 changed files with 153 additions and 57 deletions
+4 -9
View File
@@ -16,18 +16,13 @@ Group=rustfs
# working directory
WorkingDirectory=/opt/rustfs
# environment variable configuration and main program (Option 1: Directly specify arguments)
Environment=RUSTFS_ACCESS_KEY=rustfsadmin
Environment=RUSTFS_SECRET_KEY=rustfsadmin
ExecStart=/usr/local/bin/rustfs \
--address 0.0.0.0:9000 \
--volumes /data/rustfs/vol1,/data/rustfs/vol2 \
--console-enable
# environment variable configuration and main program (single active ExecStart).
# Credentials are loaded from /etc/default/rustfs below. Replace the sample values before deployment.
# environment variable configuration (Option 2: Use environment variables)
# rustfs example file see: `../config/rustfs.env`
EnvironmentFile=-/etc/default/rustfs
ExecStart=/usr/local/bin/rustfs $RUSTFS_VOLUMES $RUSTFS_OPTS
EnvironmentFile=/etc/default/rustfs
ExecStart=/usr/local/bin/rustfs $RUSTFS_VOLUMES
# service log configuration
LogsDirectory=rustfs