mirror of
https://github.com/versity/versitygw.git
synced 2026-01-05 03:24:04 +00:00
Using Docker ENTRYPOINT should allow for configuration of running versitygw within Docker container similar to how the systemd service is setup with environment variables. This also adds the backends azure and plugin to the acceptable backend options for both docker and systemd. Fixes #1335
34 lines
1.0 KiB
Desktop File
34 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=VersityGW
|
|
Documentation=https://github.com/versity/versitygw/wiki
|
|
Wants=network-online.target
|
|
After=network-online.target remote-fs.target
|
|
AssertFileIsExecutable=/usr/bin/versitygw
|
|
AssertPathExists=/etc/versitygw.d/%i.conf
|
|
|
|
[Service]
|
|
WorkingDirectory=/root
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
SyslogIdentifier=versitygw-%i
|
|
|
|
User=root
|
|
Group=root
|
|
|
|
EnvironmentFile=/etc/versitygw.d/%i.conf
|
|
|
|
ExecStart=/bin/bash -c 'if [[ ! ("${VGW_BACKEND}" == "posix" || "${VGW_BACKEND}" == "scoutfs" || "${VGW_BACKEND}" == "s3" || "${VGW_BACKEND}" == "azure" || "${VGW_BACKEND}" == "plugin") ]]; then echo "VGW_BACKEND environment variable ${VGW_BACKEND} not set to valid backend type"; exit 1; fi && exec /usr/bin/versitygw "$VGW_BACKEND" "$VGW_BACKEND_ARG"'
|
|
|
|
# Let systemd restart this service always
|
|
Restart=always
|
|
|
|
# Specifies the maximum file descriptor number that can be opened by this process
|
|
LimitNOFILE=65536
|
|
|
|
# Specifies the maximum number of threads this process can create
|
|
TasksMax=infinity
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|