Compare commits
2 Commits
b264f9bb02
...
2d10f4e26a
Author | SHA1 | Date |
---|---|---|
Александр | 2d10f4e26a | |
Alexander Zhirov | 2fcd0fbb46 |
|
@ -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
|
|
@ -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
|
59
README.md
59
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 <your-ip-address> # 192.168.0.1
|
||||
port <your-port> # 587
|
||||
auth on
|
||||
user <your-email-address> # example@mail.domain
|
||||
from <your-from-email-address> # example@mail.domain
|
||||
password <your-email-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: <select "egeya" from the list>
|
||||
Admin pass: <specify yours>
|
||||
```
|
||||
7. That's all.
|
||||
|
||||
![Installation screenshot](/install-screenshot.png)
|
||||
|
||||
## Start / Stop
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
docker-compose stop
|
||||
```
|
||||
|
||||
## Updates
|
||||
|
||||
- To update PHP version, go to .env, change version and run
|
||||
`docker-compose up -d`
|
||||
- To update MariaDB version, go to .env, change version and run
|
||||
`docker-compose up -d`
|
||||
- To update blog version, go to .env, change version and run
|
||||
`docker-compose up -d`
|
||||
|
||||
It doesn't affect an important data as it's been stored in
|
||||
|
||||
- `${PATH_VOLUMES}/user` — all user-specific settings
|
||||
- `${PATH_VOLUMES}/theme` — here you can paste your custom theme
|
||||
- `${PATH_VOLUMES}/pictures` — uploaded images
|
||||
- `${PATH_VOLUMES}/audio` — uploaded audio
|
||||
- `${PATH_VOLUMES}/video` — uploaded video
|
||||
- `${PATH_VOLUMES}/mariadb` — database data
|
|
@ -0,0 +1,46 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
|
||||
egeya:
|
||||
image: "egeya/blog:0.1"
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
PHP_VERSION: "${PHP_VERSION}"
|
||||
AEGEYA_VERSION: "${AEGEYA_VERSION}"
|
||||
container_name: "egeya"
|
||||
environment:
|
||||
- "VIRTUAL_HOST=${VIRTUAL_HOST}"
|
||||
networks:
|
||||
- "db_net"
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- "${PATH_VOLUMES}/egeya/theme:/var/www/html/themes/mytheme"
|
||||
- "${PATH_VOLUMES}/egeya/pictures:/var/www/html/pictures"
|
||||
- "${PATH_VOLUMES}/egeya/user:/var/www/html/user"
|
||||
- "${PATH_VOLUMES}/egeya/video:/var/www/html/video"
|
||||
- "${PATH_VOLUMES}/egeya/audio:/var/www/html/audio"
|
||||
depends_on:
|
||||
- "mariadb"
|
||||
|
||||
mariadb:
|
||||
image: "mariadb:${MARIADB_VERSION}"
|
||||
restart: "always"
|
||||
container_name: "mariadb"
|
||||
environment:
|
||||
- "MARIADB_USER=${MARIADB_USER}"
|
||||
- "MARIADB_PASSWORD=${MARIADB_PASSWORD}"
|
||||
- "MARIADB_DATABASE=${MARIADB_DATABASE}"
|
||||
- "MARIADB_RANDOM_ROOT_PASSWORD=yes"
|
||||
networks:
|
||||
- "db_net"
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- "${PATH_VOLUMES}/mariadb:/var/lib/mysql"
|
||||
|
||||
networks:
|
||||
db_net:
|
||||
name: "db_net"
|
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
|
@ -0,0 +1,19 @@
|
|||
# Set defaults.
|
||||
defaults
|
||||
|
||||
# Enable or disable TLS/SSL encryption.
|
||||
tls on
|
||||
tls_certcheck off
|
||||
|
||||
# Set up a default account's settings.
|
||||
account main
|
||||
host <your-ip-address>
|
||||
port <your-port>
|
||||
auth on
|
||||
user <your-email-address>
|
||||
from <your-from-email-address>
|
||||
password <your-email-password>
|
||||
logfile /var/log/msmtp_main.log
|
||||
|
||||
# Set a default account
|
||||
account default : main
|
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Loading…
Reference in New Issue