mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
better startup scripts
This commit is contained in:
parent
6239b0cab7
commit
d09a7cb96f
5 changed files with 51 additions and 38 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
|
|
||||||
versions=("7.3" "7.4" "8.0" "8.1")
|
versions=("7.3" "7.4" "8.0" "8.1")
|
||||||
|
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ RUN DEBIAN_FRONTEND=noninteractive ;\
|
||||||
gdb \
|
gdb \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
procps \
|
procps \
|
||||||
ncat \
|
# chromium \
|
||||||
chromium && \
|
ncat && \
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.1.35.zip" -o "awscliv2.zip" && \
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.1.35.zip" -o "awscliv2.zip" && \
|
||||||
unzip awscliv2.zip && \
|
unzip awscliv2.zip && \
|
||||||
./aws/install && \
|
./aws/install && \
|
||||||
|
|
|
||||||
|
|
@ -67,9 +67,11 @@ fi
|
||||||
|
|
||||||
if [ -n "$BLACKFIRE_SERVER_ID" ]
|
if [ -n "$BLACKFIRE_SERVER_ID" ]
|
||||||
then
|
then
|
||||||
|
sh -c '
|
||||||
yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
|
yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
|
||||||
mkdir /var/run/blackfire/
|
mkdir /var/run/blackfire/
|
||||||
BLACKFIRE_LOG_LEVEL=4 BLACKFIRE_LOG_FILE=/var/log/agent.log blackfire agent &
|
BLACKFIRE_LOG_LEVEL=4 BLACKFIRE_LOG_FILE=/var/log/agent.log blackfire agent &
|
||||||
|
'&
|
||||||
fi
|
fi
|
||||||
|
|
||||||
crontab /etc/oc-cron.conf
|
crontab /etc/oc-cron.conf
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,20 @@ tail --follow --retry /var/log/nginx/*.log &
|
||||||
UID=${UID:-1000}
|
UID=${UID:-1000}
|
||||||
GID=${GID:-1000}
|
GID=${GID:-1000}
|
||||||
|
|
||||||
|
if [ $(getent group $GID) ]; then
|
||||||
|
groupadd haze
|
||||||
|
EXTRA_GROUP=" -G haze"
|
||||||
|
else
|
||||||
groupadd -g $GID haze
|
groupadd -g $GID haze
|
||||||
useradd -m -u $UID -g $GID haze
|
EXTRA_GROUP=""
|
||||||
chown -R haze:haze /home/haze
|
fi
|
||||||
|
useradd -u $UID -g $GID $EXTRA_GROUP haze
|
||||||
|
chown -R haze:$GID /home/haze
|
||||||
|
|
||||||
|
if [ -f "/var/run/docker.sock" ]; then
|
||||||
groupadd docker -g $(stat --format "%g" /var/run/docker.sock)
|
groupadd docker -g $(stat --format "%g" /var/run/docker.sock)
|
||||||
usermod -a -G docker haze
|
usermod -a -G docker haze
|
||||||
|
fi
|
||||||
|
|
||||||
/usr/local/sbin/php-fpm &
|
/usr/local/sbin/php-fpm &
|
||||||
/etc/init.d/nginx start
|
nginx
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
versions=("7.3" "7.4" "8.0" "8.1" "7.3-dbg" "7.4-dbg" "8.0-dbg" "8.1-dbg")
|
versions=("7.3" "7.4" "8.0" "8.1" "7.3-dbg" "7.4-dbg" "8.0-dbg" "8.1-dbg")
|
||||||
|
versions=("7.4")
|
||||||
|
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
docker push "icewind1991/haze-php:$version"
|
docker push "icewind1991/haze-php:$version"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue