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
|
||||
|
||||
export DOCKER_BUILDKIT=1
|
||||
|
||||
versions=("7.3" "7.4" "8.0" "8.1")
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
|
|
|
|||
|
|
@ -2,42 +2,42 @@ ARG PHP_VERSION
|
|||
FROM icewind1991/haze-php:$PHP_VERSION
|
||||
|
||||
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 install --assume-yes \
|
||||
cron \
|
||||
redis-server \
|
||||
smbclient \
|
||||
npm \
|
||||
cron \
|
||||
redis-server \
|
||||
smbclient \
|
||||
npm \
|
||||
sudo \
|
||||
wget \
|
||||
attr \
|
||||
git \
|
||||
neovim \
|
||||
nano \
|
||||
sqlite3 \
|
||||
s3cmd \
|
||||
gdb \
|
||||
python3-pip \
|
||||
procps \
|
||||
ncat \
|
||||
chromium && \
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.1.35.zip" -o "awscliv2.zip" && \
|
||||
unzip awscliv2.zip && \
|
||||
./aws/install && \
|
||||
pip3 install awscli-plugin-endpoint && \
|
||||
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 && \
|
||||
install -t /usr/bin drone && \
|
||||
wget https://github.com/vimeo/psalm/releases/latest/download/psalm.phar -O /usr/local/bin/psalm && \
|
||||
chmod +x /usr/local/bin/psalm
|
||||
neovim \
|
||||
nano \
|
||||
sqlite3 \
|
||||
s3cmd \
|
||||
gdb \
|
||||
python3-pip \
|
||||
procps \
|
||||
# chromium \
|
||||
ncat && \
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.1.35.zip" -o "awscliv2.zip" && \
|
||||
unzip awscliv2.zip && \
|
||||
./aws/install && \
|
||||
pip3 install awscli-plugin-endpoint && \
|
||||
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 && \
|
||||
install -t /usr/bin drone && \
|
||||
wget https://github.com/vimeo/psalm/releases/latest/download/psalm.phar -O /usr/local/bin/psalm && \
|
||||
chmod +x /usr/local/bin/psalm
|
||||
|
||||
ADD misc/collaboraonline.sources /etc/apt/sources.list.d
|
||||
RUN DEBIAN_FRONTEND=noninteractive ;\
|
||||
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 && \
|
||||
wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg -O /usr/share/keyrings/collaboraonline-release-keyring.gpg && \
|
||||
apt-get update && \
|
||||
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 && \
|
||||
wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg -O /usr/share/keyrings/collaboraonline-release-keyring.gpg && \
|
||||
apt-get update && \
|
||||
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/
|
||||
|
|
|
|||
|
|
@ -67,9 +67,11 @@ fi
|
|||
|
||||
if [ -n "$BLACKFIRE_SERVER_ID" ]
|
||||
then
|
||||
yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
|
||||
mkdir /var/run/blackfire/
|
||||
BLACKFIRE_LOG_LEVEL=4 BLACKFIRE_LOG_FILE=/var/log/agent.log blackfire agent &
|
||||
sh -c '
|
||||
yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
|
||||
mkdir /var/run/blackfire/
|
||||
BLACKFIRE_LOG_LEVEL=4 BLACKFIRE_LOG_FILE=/var/log/agent.log blackfire agent &
|
||||
'&
|
||||
fi
|
||||
|
||||
crontab /etc/oc-cron.conf
|
||||
|
|
|
|||
|
|
@ -8,12 +8,20 @@ tail --follow --retry /var/log/nginx/*.log &
|
|||
UID=${UID:-1000}
|
||||
GID=${GID:-1000}
|
||||
|
||||
groupadd -g $GID haze
|
||||
useradd -m -u $UID -g $GID haze
|
||||
chown -R haze:haze /home/haze
|
||||
if [ $(getent group $GID) ]; then
|
||||
groupadd 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)
|
||||
usermod -a -G docker haze
|
||||
if [ -f "/var/run/docker.sock" ]; then
|
||||
groupadd docker -g $(stat --format "%g" /var/run/docker.sock)
|
||||
usermod -a -G docker haze
|
||||
fi
|
||||
|
||||
/usr/local/sbin/php-fpm &
|
||||
/etc/init.d/nginx start
|
||||
nginx
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
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.4")
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
docker push "icewind1991/haze-php:$version"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue