1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

better startup scripts

This commit is contained in:
Robin Appelman 2022-08-07 19:40:16 +02:00
commit d09a7cb96f
5 changed files with 51 additions and 38 deletions

View file

@ -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

View file

@ -2,42 +2,42 @@ ARG PHP_VERSION
FROM icewind1991/haze-php:$PHP_VERSION FROM icewind1991/haze-php:$PHP_VERSION
RUN DEBIAN_FRONTEND=noninteractive ;\ RUN DEBIAN_FRONTEND=noninteractive ;\
echo 'deb http://http.debian.net/debian buster-backports main' >> /etc/apt/sources.list && \ echo 'deb http://http.debian.net/debian buster-backports main' >> /etc/apt/sources.list && \
apt-get update && \ apt-get update && \
apt-get install --assume-yes \ apt-get install --assume-yes \
cron \ cron \
redis-server \ redis-server \
smbclient \ smbclient \
npm \ npm \
sudo \ sudo \
wget \ wget \
attr \ attr \
git \ git \
neovim \ neovim \
nano \ nano \
sqlite3 \ sqlite3 \
s3cmd \ s3cmd \
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 && \
pip3 install awscli-plugin-endpoint && \ pip3 install awscli-plugin-endpoint && \
wget https://phar.phpunit.de/phpunit-8.phar -O /usr/local/bin/phpunit.phar && \ wget https://phar.phpunit.de/phpunit-8.phar -O /usr/local/bin/phpunit.phar && \
curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx && \ curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx && \
install -t /usr/bin drone && \ install -t /usr/bin drone && \
wget https://github.com/vimeo/psalm/releases/latest/download/psalm.phar -O /usr/local/bin/psalm && \ wget https://github.com/vimeo/psalm/releases/latest/download/psalm.phar -O /usr/local/bin/psalm && \
chmod +x /usr/local/bin/psalm chmod +x /usr/local/bin/psalm
ADD misc/collaboraonline.sources /etc/apt/sources.list.d ADD misc/collaboraonline.sources /etc/apt/sources.list.d
RUN DEBIAN_FRONTEND=noninteractive ;\ RUN DEBIAN_FRONTEND=noninteractive ;\
wget -q -O - https://packages.blackfire.io/gpg.key | apt-key add - && \ wget -q -O - https://packages.blackfire.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" >> /etc/apt/sources.list.d/blackfire.list && \ echo "deb http://packages.blackfire.io/debian any main" >> /etc/apt/sources.list.d/blackfire.list && \
wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg -O /usr/share/keyrings/collaboraonline-release-keyring.gpg && \ wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg -O /usr/share/keyrings/collaboraonline-release-keyring.gpg && \
apt-get update && \ apt-get update && \
apt-get install --assume-yes blackfire apt-get install --assume-yes blackfire
ADD configs/autoconfig_mariadb.php configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/s3mb.php configs/swift.php configs/swiftv3.php configs/azure.php configs/config.php /root/ ADD configs/autoconfig_mariadb.php configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/s3mb.php configs/swift.php configs/swiftv3.php configs/azure.php configs/config.php /root/

View file

@ -67,9 +67,11 @@ fi
if [ -n "$BLACKFIRE_SERVER_ID" ] if [ -n "$BLACKFIRE_SERVER_ID" ]
then then
yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN sh -c '
mkdir /var/run/blackfire/ yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
BLACKFIRE_LOG_LEVEL=4 BLACKFIRE_LOG_FILE=/var/log/agent.log blackfire agent & mkdir /var/run/blackfire/
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

View file

@ -8,12 +8,20 @@ tail --follow --retry /var/log/nginx/*.log &
UID=${UID:-1000} UID=${UID:-1000}
GID=${GID:-1000} GID=${GID:-1000}
groupadd -g $GID haze if [ $(getent group $GID) ]; then
useradd -m -u $UID -g $GID haze groupadd haze
chown -R haze:haze /home/haze EXTRA_GROUP=" -G haze"
else
groupadd -g $GID haze
EXTRA_GROUP=""
fi
useradd -u $UID -g $GID $EXTRA_GROUP haze
chown -R haze:$GID /home/haze
groupadd docker -g $(stat --format "%g" /var/run/docker.sock) if [ -f "/var/run/docker.sock" ]; then
usermod -a -G docker haze groupadd docker -g $(stat --format "%g" /var/run/docker.sock)
usermod -a -G docker haze
fi
/usr/local/sbin/php-fpm & /usr/local/sbin/php-fpm &
/etc/init.d/nginx start nginx

View file

@ -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"