This commit is contained in:
Matthos Denys 2021-03-02 16:29:27 +03:00
parent ccb971cf5f
commit cc499f4c2d
4 changed files with 7 additions and 5 deletions

View File

@ -28,8 +28,10 @@ else
# save sql # save sql
echo "[i] Create temp file: $tfile" echo "[i] Create temp file: $tfile"
cat << EOF > $tfile cat << EOF > $tfile
CREATE DATABASE wordpress; CREATE DATABASE wordpress;
CREATE USER 'pma'@'%' IDENTIFIED BY 'pma'; GRANT ALL PRIVILEGES ON *.* TO 'pma'@'%' WITH GRANT OPTION; USE wordpress; FLUSH PRIVILEGES; CREATE USER 'new'@'%' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON *.* TO 'new'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EOF EOF
echo 'FLUSH PRIVILEGES;' >> $tfile echo 'FLUSH PRIVILEGES;' >> $tfile

View File

@ -1,13 +1,14 @@
FROM alpine:3.12 FROM alpine:3.12
LABEL maintainer="mdenys" LABEL maintainer="mdenys"
RUN apk update RUN apk update
RUN apk add supervisor nginx php7 php7-fpm php7-opcache php7-gd php7-mysqli php7-zlib php7-curl php7-mbstring php7-json php7-session RUN apk add supervisor nginx php7 php7-fpm php7-opcache php7-gd php7-mysqli php7-zlib php7-curl php7-mbstring php7-json php7-session mysql
RUN mkdir -p /var/www/localhost/htdocs/ RUN mkdir -p /var/www/localhost/htdocs/
RUN mkdir -p /run/php7 RUN mkdir -p /run/php7
RUN mkdir -p /run/nginx RUN mkdir -p /run/nginx
RUN wget http://files.directadmin.com/services/all/phpMyAdmin/phpMyAdmin-5.0.1-all-languages.tar.gz RUN wget http://files.directadmin.com/services/all/phpMyAdmin/phpMyAdmin-5.0.1-all-languages.tar.gz
RUN tar -xvf phpMyAdmin-5.0.1-all-languages.tar.gz --strip-components 1 -C /var/www/localhost/htdocs/ RUN tar -xvf phpMyAdmin-5.0.1-all-languages.tar.gz --strip-components 1 -C /var/www/localhost/htdocs/
COPY phpmyadmin.inc.php /var/www/localhost/htdocs/config.inc.php COPY phpmyadmin.inc.php /var/www/localhost/htdocs/config.inc.php
RUN mkdir -p /var/www/localhost/htdocs/tmp
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY supervisord.conf /etc/supervisord.conf COPY supervisord.conf /etc/supervisord.conf
EXPOSE 5000 EXPOSE 5000

View File

@ -5,10 +5,8 @@ $i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'mysql-service'; $cfg['Servers'][$i]['host'] = 'mysql-service';
$cfg['Servers'][$i]['port'] = 3306; $cfg['Servers'][$i]['port'] = 3306;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['UploadDir'] = ''; $cfg['UploadDir'] = '';
$cfg['SaveDir'] = ''; $cfg['SaveDir'] = '';
?> ?>

View File

@ -1,5 +1,6 @@
[supervisord] [supervisord]
nodaemon=true nodaemon=true
user=root
[program:php] [program:php]
command= /usr/sbin/php-fpm7 command= /usr/sbin/php-fpm7
[program:nginx] [program:nginx]