Skip to content

Commit 25292f3

Browse files
committed
Allow starman's --user option to be specified in the MT_UID environment variable.
1 parent a1b4e45 commit 25292f3

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010

1111
* If the given URL is http://github.com/... and returns 404, then try to download the archive with the `gh` command and try to download the archive at http://github.com/...
12+
* Allow starman's --user option to be specified in the MT_UID environment variable.
1213

1314
## [2.8.0] - 2025-04-23
1415

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export DOCKER_MAILPIT_IMAGE
5252
export DOCKER_VOLUME_MOUNT_FLAG
5353
export MT_RUN_VIA
5454
export MT_EXPOSE_PORT
55+
export MT_UID
5556
export MAILPIT_EXPOSE_PORT
5657
export PLACKUP
5758
export CMD

mt/plackup-mt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/usr/bin/env bash
22

3+
if [ -z "$MT_UID" ]; then
4+
user=$(id -u)
5+
else
6+
user=$MT_UID
7+
fi
8+
39
exec starman \
410
-Iextlib \
511
-MCGI \
@@ -15,4 +21,5 @@ exec starman \
1521
--port=80 \
1622
--workers=2 \
1723
--pid=$MT_PID_FILE_PATH \
24+
--user=$user \
1825
"$@"

mt/psgi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44
command: "${PLACKUP:-/usr/local/lib/mt/bin/plackup-mt} /var/www/cgi-bin/mt/mt.psgi"
55
environment:
66
MT_PID_FILE_PATH: ${MT_PID_FILE_PATH:-/tmp/mt.psgi.pid}
7+
MT_UID: $MT_UID
78
volumes:
89
- "./plackup-mt:/usr/local/lib/mt/bin/plackup-mt"
910

0 commit comments

Comments
 (0)