added run instructions
This commit is contained in:
parent
a4697f91c1
commit
b53aa8d0c6
44
README.md
44
README.md
@ -17,6 +17,50 @@ docker-compose up -d
|
||||
xdg-open http://localhost:8000
|
||||
```
|
||||
|
||||
|
||||
## Running production
|
||||
This includes database config \
|
||||
copy paste this in docker-compose.yml \
|
||||
run `docker compose up -d`
|
||||
```
|
||||
version: '3.5'
|
||||
services:
|
||||
#########################
|
||||
zabbix:
|
||||
build: .
|
||||
image: zabbix
|
||||
volumes:
|
||||
- $PWD/configdir/etc/zabbix/zabbix_server.conf:/etc/zabbix/zabbix_server.conf
|
||||
- $PWD/configdir/etc/zabbix/nginx.conf:/etc/zabbix/nginx.conf
|
||||
- $PWD/configdir/etc/zabbix/web/zabbix.conf.php:/etc/zabbix/web/zabbix.conf.php
|
||||
- $PWD/configdir/etc/php/7.4/fpm/php-fpm.conf:/etc/php/7.4/fpm/php-fpm.conf
|
||||
- $PWD/datadir/usr/lib/zabbix/externalscripts:/usr/lib/zabbix/externalscripts
|
||||
- $PWD/datadir/usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts
|
||||
ports:
|
||||
- 8000:80
|
||||
- 10051:10051
|
||||
restart: always
|
||||
#########################
|
||||
db:
|
||||
image: mysql:8
|
||||
environment:
|
||||
MYSQL_DATABASE: zabbix
|
||||
MYSQL_USER: zabbix
|
||||
MYSQL_PASSWORD: zabbix
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: true
|
||||
command:
|
||||
- mysqld
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_bin
|
||||
- --skip-character-set-client-handshake
|
||||
- --default-authentication-plugin=mysql_native_password
|
||||
volumes:
|
||||
- $PWD/configdir/init/init.db:/docker-entrypoint-initdb.d
|
||||
- $PWD/datadir/mysql:/var/lib/mysql
|
||||
restart: always
|
||||
depends_on:
|
||||
- zabbix
|
||||
```
|
||||
## To-do
|
||||
- mount all needed config dirs outside container. (currently only basic configs are there)
|
||||
- mount scirpt dirs outside container add alert and other custom scripts.
|
||||
|
@ -3,7 +3,7 @@ services:
|
||||
#########################
|
||||
zabbix:
|
||||
build: .
|
||||
image: zabbix
|
||||
image: git.shihaam.dev/dockerfiles/zabbix-server
|
||||
volumes:
|
||||
- $PWD/configdir/etc/zabbix/zabbix_server.conf:/etc/zabbix/zabbix_server.conf
|
||||
- $PWD/configdir/etc/zabbix/nginx.conf:/etc/zabbix/nginx.conf
|
||||
@ -15,23 +15,3 @@ services:
|
||||
- 8000:80
|
||||
- 10051:10051
|
||||
restart: always
|
||||
#########################
|
||||
db:
|
||||
image: mysql:8
|
||||
environment:
|
||||
MYSQL_DATABASE: zabbix
|
||||
MYSQL_USER: zabbix
|
||||
MYSQL_PASSWORD: zabbix
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: true
|
||||
command:
|
||||
- mysqld
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_bin
|
||||
- --skip-character-set-client-handshake
|
||||
- --default-authentication-plugin=mysql_native_password
|
||||
volumes:
|
||||
- $PWD/configdir/init/init.db:/docker-entrypoint-initdb.d
|
||||
- $PWD/datadir/mysql:/var/lib/mysql
|
||||
restart: always
|
||||
depends_on:
|
||||
- zabbix
|
||||
|
Loading…
x
Reference in New Issue
Block a user