mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
* refactor(config): Unify S3 API and Console ports This commit streamlines the server configuration by unifying the S3 API and the WebUI (Console) to serve on a single port. Previously, the console was managed by separate configuration options (`RUSTFS_CONSOLE_ENABLE` and `RUSTFS_CONSOLE_ADDRESS`), requiring a distinct port. This added complexity to deployment and configuration. With this change: - The `RUSTFS_CONSOLE_ADDRESS` and `RUSTFS_CONSOLE_FS_ENDPOINT` environment variables are removed. - The WebUI is now always available and served directly from the main application port defined by `RUSTFS_ADDRESS`. - This simplifies setup, reduces the number of exposed ports, and makes the application easier to manage and deploy, especially in containerized environments. Users should update their startup scripts and remove the deprecated `RUSTFS_CONSOLE_*` variables. * improve docker comprose config file and remove docs dir
64 lines
1.6 KiB
Desktop File
64 lines
1.6 KiB
Desktop File
[Unit]
|
|
Description=RustFS Object Storage Server
|
|
Documentation=https://rustfs.com/docs/
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
# If you're using a database, you'll need to add the corresponding dependencies
|
|
# After=postgresql.service
|
|
# Requires=postgresql.service
|
|
|
|
[Service]
|
|
Type=notify
|
|
NotifyAccess=main
|
|
User=rustfs
|
|
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 (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
|
|
|
|
# service log configuration
|
|
StandardOutput=append:/data/deploy/rust/logs/rustfs.log
|
|
StandardError=append:/data/deploy/rust/logs/rustfs-err.log
|
|
|
|
# resource constraints
|
|
LimitNOFILE=1048576
|
|
LimitNPROC=32768
|
|
TasksMax=infinity
|
|
|
|
# restart the policy
|
|
Restart=always
|
|
RestartSec=10s
|
|
|
|
# graceful exit configuration
|
|
TimeoutStartSec=30s
|
|
TimeoutStopSec=30s
|
|
|
|
# security settings
|
|
NoNewPrivileges=true
|
|
ProtectSystem=full
|
|
ProtectHome=true
|
|
PrivateTmp=true
|
|
PrivateDevices=true
|
|
ProtectClock=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
RestrictSUIDSGID=true
|
|
RestrictRealtime=true
|
|
ReadWritePaths=/data/rustfs
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |