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
|
||||
```
|
||||
|
||||
Or in docker-compose format:
|
||||
```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
|
||||
```
|
||||
Or for docker-compose format, see [docker-compose.yml](docker-compose.yml).
|
||||
|
||||
## 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/).
|
||||
|
||||
### MySQL
|
||||
|
@ -148,6 +130,7 @@ volumes:
|
|||
```
|
||||
|
||||
### Step 1: Run `docker-compose.yml`.
|
||||
Select one of configurations above and save it to `docker-compose.yml`. Then run:
|
||||
```sh
|
||||
docker-compose up -d
|
||||
```
|
||||
|
|
|
@ -1,33 +1,17 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
webserver:
|
||||
blog:
|
||||
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
|
||||
environment:
|
||||
TZ: Europe/Vienna
|
||||
BLOG_TITLE: Blog
|
||||
BLOG_NAME: Max Musermann
|
||||
BLOG_NICK: username
|
||||
BLOG_PASS: password
|
||||
BLOG_LANG: en
|
||||
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:
|
||||
- mariadb:/var/lib/mysql
|
||||
- ./app/db/mysql:/docker-entrypoint-initdb.d:ro
|
||||
volumes:
|
||||
mariadb:
|
||||
- ./data:/var/www/html/data
|
||||
|
|
Loading…
Reference in a new issue