Skip to content

Commit

Permalink
Merge pull request #85 from metno/update-tests
Browse files Browse the repository at this point in the history
use /dev/stdout
  • Loading branch information
TAlonglong authored Nov 15, 2024
2 parents fe0da1b + 470a362 commit 8d6ced5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion containers/fastapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN mkdir -pv /usr/share/unit/welcome && chown -R $MAMBA_USER:$MAMBA_USER /usr/share/unit
COPY --chown=$MAMBA_USER:$MAMBA_USER welcome.* /usr/share/unit/welcome/
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD unitd --no-daemon --control unix:/var/run/unit/control.unit.sock --statedir /var/lib/unit --pid /var/run/unit/unit.pid --log /proc/1/fd/1 | tee /var/log/unit/unit.log
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/unit/control.unit.sock", "--statedir", "/var/lib/unit", "--pid", "/var/run/unit/unit.pid", "--log", "/proc/1/fd/1"]
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
echo "$0: /var/lib/unit/ is not empty, skipping initial configuration..."
else
echo "$0: Launching Unit daemon to perform initial configuration..."
/usr/sbin/$1 --control unix:/var/run/unit/control.unit.sock --log /proc/1/fd/1 --statedir /var/lib/unit --pid /var/run/unit/unit.pid
/usr/sbin/$1 --control unix:/var/run/unit/control.unit.sock --log /dev/stdout --statedir /var/lib/unit --pid /var/run/unit/unit.pid

for i in $(/usr/bin/seq $WAITLOOPS); do
if [ ! -S /var/run/unit/control.unit.sock ]; then
Expand Down Expand Up @@ -101,4 +101,4 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
fi
fi

exec "$@"
exec "$@" 2>&1 | tee -a /var/log/unit/unit.log

0 comments on commit 8d6ced5

Please sign in to comment.