diff --git a/.env b/.env new file mode 100644 index 0000000..256abed --- /dev/null +++ b/.env @@ -0,0 +1,11 @@ +PHP_VERSION=7.3 +AEGEYA_VERSION=3849 +MARIADB_VERSION=latest + +MARIADB_USER=egeya +MARIADB_PASSWORD=egeya +MARIADB_DATABASE=egeya + +VIRTUAL_HOST=localhost + +PATH_VOLUMES=/var/volumes-data diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..07b430b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +ARG PHP_VERSION +FROM php:${PHP_VERSION}-apache + +RUN apt-get update \ + && apt-get install -y libpng-dev libjpeg-dev libmcrypt-dev libzip-dev unzip git msmtp \ + && rm -rf /var/lib/apt/lists/* \ + && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ + && docker-php-ext-install gd mbstring mysqli pdo_mysql zip +RUN a2enmod rewrite actions + +# Copy the settings file mSMTP +COPY msmtprc /etc/msmtprc +RUN chmod 600 /etc/msmtprc + +# Change the default mail sending server in php.ini +COPY script.sh /tmp/script.sh +RUN chmod +x /tmp/script.sh \ + && /tmp/script.sh + +ARG AEGEYA_VERSION +ENV DIST e2_distr_v${AEGEYA_VERSION}.zip +ENV URL https://blogengine.ru/download/${DIST} +RUN curl -O ${URL} \ + && unzip ${DIST} -d /var/www/html + +EXPOSE 80 diff --git a/README.md b/README.md index e69de29..0e1b5d3 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,59 @@ +## Install + +1. Clone this git repo + `git clone https://git.zhirov.website/alexander/egeya_docker.git .` +2. Specify needed parameters in `.env` file +3. Specify needed parameters mail server in `msmtprc` file or see the [official documentation mSMTP](https://marlam.de/msmtp/msmtp.html): + ``` + account main + host # 192.168.0.1 + port # 587 + auth on + user # example@mail.domain + from # example@mail.domain + password + logfile /var/log/msmtp_main.log + ``` +4. Run with `--build` flag for the first time + `docker-compose up -d --build` + + ![Installation screenshot](/permission-denied.png) + +5. After starting the services, you need to grant read/write permissions to volumes: + `chown -R www-data:www-data ${PATH_VOLUMES}` +6. Go to `VIRTUAL_HOST` address and fill the Egeya setup form with data: + ``` + DB Host: mariadb + DB User: root + DB Pass: egeya + DB Database: