update readme.
This commit is contained in:
parent
b41c4a57fc
commit
d13d6ab98e
2 changed files with 13 additions and 46 deletions
23
README.md
23
README.md
|
@ -53,27 +53,9 @@ docker run -d \
|
||||||
m1k1o/blog:latest
|
m1k1o/blog:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Or in docker-compose format:
|
Or for docker-compose format, see [docker-compose.yml](docker-compose.yml).
|
||||||
```yml
|
|
||||||
version: "3"
|
|
||||||
services:
|
|
||||||
blog:
|
|
||||||
image: m1k1o/blog:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
TZ: Europe/Vienna
|
|
||||||
BLOG_TITLE: Blog
|
|
||||||
BLOG_NAME: Max Musermann
|
|
||||||
BLOG_NICK: username
|
|
||||||
BLOG_PASS: password
|
|
||||||
BLOG_LANG: en
|
|
||||||
ports:
|
|
||||||
- 80:80
|
|
||||||
volumes:
|
|
||||||
- ./data:/var/www/html/data
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install standalone app using `docker-compose`
|
## Install standalone app using `docker-compose` with external database
|
||||||
You need to install [docker-compose](https://docs.docker.com/compose/install/).
|
You need to install [docker-compose](https://docs.docker.com/compose/install/).
|
||||||
|
|
||||||
### MySQL
|
### MySQL
|
||||||
|
@ -148,6 +130,7 @@ volumes:
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 1: Run `docker-compose.yml`.
|
### Step 1: Run `docker-compose.yml`.
|
||||||
|
Select one of configurations above and save it to `docker-compose.yml`. Then run:
|
||||||
```sh
|
```sh
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,33 +1,17 @@
|
||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
webserver:
|
blog:
|
||||||
image: m1k1o/blog:latest
|
image: m1k1o/blog:latest
|
||||||
container_name: blog_apache
|
|
||||||
environment:
|
|
||||||
TZ: Europe/Vienna
|
|
||||||
BLOG_DB_CONNECTION: mysql
|
|
||||||
BLOG_MYSQL_HOST: mariadb
|
|
||||||
BLOG_MYSQL_PORT: 3306
|
|
||||||
BLOG_MYSQL_USER: blog
|
|
||||||
BLOG_MYSQL_PASS: blog # use secure password
|
|
||||||
BLOG_DB_NAME: blog
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
TZ: Europe/Vienna
|
||||||
|
BLOG_TITLE: Blog
|
||||||
|
BLOG_NAME: Max Musermann
|
||||||
|
BLOG_NICK: username
|
||||||
|
BLOG_PASS: password
|
||||||
|
BLOG_LANG: en
|
||||||
ports:
|
ports:
|
||||||
- ${HTTP_PORT-80}:80
|
- 80:80
|
||||||
volumes:
|
|
||||||
- ${DATA-./data}:/var/www/html/data
|
|
||||||
mariadb:
|
|
||||||
image: mariadb:10.1
|
|
||||||
container_name: blog_mariadb
|
|
||||||
environment:
|
|
||||||
MYSQL_USER: blog
|
|
||||||
MYSQL_PASSWORD: blog # use secure password
|
|
||||||
MYSQL_DATABASE: blog
|
|
||||||
MYSQL_ROOT_PASSWORD: root # use secure password
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
volumes:
|
||||||
- mariadb:/var/lib/mysql
|
- ./data:/var/www/html/data
|
||||||
- ./app/db/mysql:/docker-entrypoint-initdb.d:ro
|
|
||||||
volumes:
|
|
||||||
mariadb:
|
|
||||||
|
|
Loading…
Reference in a new issue