...
This commit is contained in:
parent
8167183686
commit
5ec489e0e0
@ -1,6 +1,6 @@
|
|||||||
TZ: Europe/Berlin
|
TZ: Europe/Berlin
|
||||||
GLPI_LANG: de_DE
|
GLPI_LANG: de_DE
|
||||||
MARIADB_HOST: mariadb-glpi
|
MARIADB_HOST: glpi-db
|
||||||
MARIADB_PORT: 3306
|
MARIADB_PORT: 3306
|
||||||
MARIADB_DATABASE: glpi
|
MARIADB_DATABASE: glpi
|
||||||
MARIADB_USER: glpi-user
|
MARIADB_USER: glpi-user
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
version: "3.5"
|
version: "3.5"
|
||||||
services:
|
services:
|
||||||
mariadb-glpi:
|
mariadb:
|
||||||
image: fametec/glpi:mariadb
|
image: fametec/glpi:mariadb
|
||||||
container_name: glpi-db
|
container_name: glpi-db
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@ -24,12 +24,12 @@ services:
|
|||||||
- ./volumes/glpi-files:/var/www/html/files:rw
|
- ./volumes/glpi-files:/var/www/html/files:rw
|
||||||
- ./volumes/glpi-plugins:/var/www/html/plugins:rw
|
- ./volumes/glpi-plugins:/var/www/html/plugins:rw
|
||||||
environment:
|
environment:
|
||||||
GLPI_LANG: ${GLPI_LANG}
|
MARIADB_HOST: ${MARIADB_HOST}
|
||||||
MARIADB_HOST: glpi-db
|
|
||||||
MARIADB_PORT: ${MARIADB_PORT}
|
MARIADB_PORT: ${MARIADB_PORT}
|
||||||
MARIADB_DATABASE: ${MARIADB_DATABASE}
|
MARIADB_DATABASE: ${MARIADB_DATABASE}
|
||||||
MARIADB_USER: ${MARIADB_USER}
|
MARIADB_USER: ${MARIADB_USER}
|
||||||
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
|
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
|
||||||
|
GLPI_LANG: ${GLPI_LANG}
|
||||||
VERSION: "9.5.6"
|
VERSION: "9.5.6"
|
||||||
PLUGINS: "all"
|
PLUGINS: "all"
|
||||||
TIMEZONE: ${TZ}
|
TIMEZONE: ${TZ}
|
||||||
@ -37,7 +37,7 @@ services:
|
|||||||
ADMINEMAIL: ${ADMINEMAIL}
|
ADMINEMAIL: ${ADMINEMAIL}
|
||||||
ORGANIZATION: ${ORGANIZATION}
|
ORGANIZATION: ${ORGANIZATION}
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb-glpi
|
- mariadb
|
||||||
ports:
|
ports:
|
||||||
- 8075:80
|
- 8075:80
|
||||||
networks:
|
networks:
|
||||||
@ -55,7 +55,7 @@ services:
|
|||||||
- ./volumes/glpi-files:/var/www/html/files:rw
|
- ./volumes/glpi-files:/var/www/html/files:rw
|
||||||
- ./volumes/glpi-plugins:/var/www/html/plugins:rw
|
- ./volumes/glpi-plugins:/var/www/html/plugins:rw
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb-glpi
|
- mariadb
|
||||||
environment:
|
environment:
|
||||||
MARIADB_HOST: ${MARIADB_HOST}
|
MARIADB_HOST: ${MARIADB_HOST}
|
||||||
MARIADB_PORT: ${MARIADB_PORT}
|
MARIADB_PORT: ${MARIADB_PORT}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
TZ=Europe/Berlin
|
||||||
|
IPAM_DATABASE_WEBHOST=%
|
||||||
|
SCAN_INTERVAL=1h
|
||||||
|
MARIADB_HOST=ipam_db
|
||||||
|
MARIADB_ROOT_PASSWORD=IPAMrootpwd
|
||||||
|
|
76
ipam/Dockerfile
Normal file
76
ipam/Dockerfile
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
FROM php:7.2-apache
|
||||||
|
MAINTAINER Pierre Cheynier <pierre.cheynier@gmail.com>
|
||||||
|
|
||||||
|
ENV PHPIPAM_SOURCE https://github.com/phpipam/phpipam/
|
||||||
|
ARG PHPIPAM_VERSION=1.5.1
|
||||||
|
ENV PHPMAILER_SOURCE https://github.com/PHPMailer/PHPMailer/
|
||||||
|
ARG PHPMAILER_VERSION=6.7.1
|
||||||
|
ENV PHPSAML_SOURCE https://github.com/onelogin/php-saml/
|
||||||
|
ARG PHPSAML_VERSION=3.4.1
|
||||||
|
ENV WEB_REPO /var/www/html
|
||||||
|
|
||||||
|
# Install required deb packages
|
||||||
|
RUN sed -i /etc/apt/sources.list -e 's/$/ non-free'/ && \
|
||||||
|
apt-get update && apt-get -y upgrade && \
|
||||||
|
rm /etc/apt/preferences.d/no-debian-php && \
|
||||||
|
apt-get install -y libcurl4-gnutls-dev libgmp-dev libmcrypt-dev libfreetype6-dev libjpeg-dev libpng-dev libldap2-dev libsnmp-dev snmp-mibs-downloader iputils-ping && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install required packages and files required for snmp
|
||||||
|
RUN mkdir -p /var/lib/mibs/ietf && \
|
||||||
|
curl -sL https://github.com/cisco/cisco-mibs/raw/main/v2/CISCO-SMI.my -o /var/lib/mibs/ietf/CISCO-SMI.txt && \
|
||||||
|
curl -sL https://github.com/cisco/cisco-mibs/raw/main/v2/CISCO-TC.my -o /var/lib/mibs/ietf/CISCO-TC.txt && \
|
||||||
|
curl -sL https://github.com/cisco/cisco-mibs/raw/main/v2/CISCO-VTP-MIB.my -o /var/lib/mibs/ietf/CISCO-VTP-MIB.txt && \
|
||||||
|
curl -sL https://github.com/cisco/cisco-mibs/raw/main/v2/MPLS-VPN-MIB.my -o /var/lib/mibs/ietf/MPLS-VPN-MIB.txt
|
||||||
|
|
||||||
|
# Configure apache and required PHP modules
|
||||||
|
RUN docker-php-ext-configure mysqli --with-mysqli=mysqlnd && \
|
||||||
|
docker-php-ext-install mysqli && \
|
||||||
|
docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-png-dir=/usr/include --with-jpeg-dir=/usr/include && \
|
||||||
|
docker-php-ext-install gd && \
|
||||||
|
docker-php-ext-install curl && \
|
||||||
|
docker-php-ext-install json && \
|
||||||
|
docker-php-ext-install snmp && \
|
||||||
|
docker-php-ext-install sockets && \
|
||||||
|
docker-php-ext-install pdo_mysql && \
|
||||||
|
docker-php-ext-install gettext && \
|
||||||
|
ln -s /usr/include/$(uname -m)-linux-gnu/gmp.h /usr/include/gmp.h && \
|
||||||
|
docker-php-ext-configure gmp --with-gmp=/usr/include/$(uname -m)-linux-gnu && \
|
||||||
|
docker-php-ext-install gmp && \
|
||||||
|
docker-php-ext-install pcntl && \
|
||||||
|
docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu && \
|
||||||
|
docker-php-ext-install ldap && \
|
||||||
|
pecl install mcrypt-1.0.1 && \
|
||||||
|
docker-php-ext-enable mcrypt && \
|
||||||
|
echo ". /etc/environment" >> /etc/apache2/envvars && \
|
||||||
|
a2enmod rewrite
|
||||||
|
|
||||||
|
COPY php.ini /usr/local/etc/php/
|
||||||
|
|
||||||
|
# Copy phpipam sources to web dir
|
||||||
|
ADD ${PHPIPAM_SOURCE}/archive/v${PHPIPAM_VERSION}.tar.gz /tmp/
|
||||||
|
RUN tar -xzf /tmp/v${PHPIPAM_VERSION}.tar.gz -C ${WEB_REPO}/ --strip-components=1
|
||||||
|
# Copy referenced submodules into the right directory
|
||||||
|
ADD ${PHPMAILER_SOURCE}/archive/v${PHPMAILER_VERSION}.tar.gz /tmp/
|
||||||
|
RUN tar -xzf /tmp/v${PHPMAILER_VERSION}.tar.gz -C ${WEB_REPO}/functions/PHPMailer/ --strip-components=1
|
||||||
|
ADD ${PHPSAML_SOURCE}/archive/refs/tags/${PHPSAML_VERSION}.tar.gz /tmp/
|
||||||
|
RUN tar -xzf /tmp/${PHPSAML_VERSION}.tar.gz -C ${WEB_REPO}/functions/php-saml/ --strip-components=1
|
||||||
|
|
||||||
|
# Use system environment variables into config.php
|
||||||
|
ENV PHPIPAM_BASE /
|
||||||
|
RUN cp ${WEB_REPO}/config.dist.php ${WEB_REPO}/config.php && \
|
||||||
|
chown www-data /var/www/html/app/admin/import-export/upload && \
|
||||||
|
chown www-data /var/www/html/app/subnets/import-subnet/upload && \
|
||||||
|
chown www-data /var/www/html/css/images/logo && \
|
||||||
|
echo "\$db['webhost'] = '%';" >> ${WEB_REPO}/config.php && \
|
||||||
|
sed -i -e "s/\['host'\] = '127.0.0.1'/\['host'\] = getenv(\"MYSQL_ENV_MYSQL_HOST\") ?: \"mysql\"/" \
|
||||||
|
-e "s/\['user'\] = 'phpipam'/\['user'\] = getenv(\"MYSQL_ENV_MYSQL_USER\") ?: \"root\"/" \
|
||||||
|
-e "s/\['name'\] = 'phpipam'/\['name'\] = getenv(\"MYSQL_ENV_MYSQL_DB\") ?: \"phpipam\"/" \
|
||||||
|
-e "s/\['pass'\] = 'phpipamadmin'/\['pass'\] = getenv(\"MYSQL_ENV_MYSQL_ROOT_PASSWORD\")/" \
|
||||||
|
-e "s/\['port'\] = 3306;/\['port'\] = 3306;\n\n\$password_file = getenv(\"MYSQL_ENV_MYSQL_PASSWORD_FILE\");\nif(file_exists(\$password_file))\n\$db\['pass'\] = preg_replace(\"\/\\\\s+\/\", \"\", file_get_contents(\$password_file));/" \
|
||||||
|
-e "s/define('BASE', \"\/\")/define('BASE', getenv(\"PHPIPAM_BASE\"))/" \
|
||||||
|
-e "s/\$gmaps_api_key.*/\$gmaps_api_key = getenv(\"GMAPS_API_KEY\") ?: \"\";/" \
|
||||||
|
-e "s/\$gmaps_api_geocode_key.*/\$gmaps_api_geocode_key = getenv(\"GMAPS_API_GEOCODE_KEY\") ?: \"\";/" \
|
||||||
|
${WEB_REPO}/config.php
|
||||||
|
|
||||||
|
EXPOSE 80
|
130
ipam/INSTALL.md
Normal file
130
ipam/INSTALL.md
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
# docker-phpipam
|
||||||
|
|
||||||
|
phpIPAM is an open-source web IP address management application. Its goal is to provide light and simple IP address management application.
|
||||||
|
|
||||||
|
phpIPAM is developed and maintained by Miha Petkovsek, released under the GPL v3 license, project source is [here](https://github.com/phpipam/phpipam).
|
||||||
|
|
||||||
|
Learn more on [phpIPAM homepage](http://phpipam.net).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## How to use this Docker image
|
||||||
|
|
||||||
|
### Mysql
|
||||||
|
|
||||||
|
Run a MySQL database, dedicated to phpipam.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker run --name phpipam-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -v /my_dir/phpipam:/var/lib/mysql -d mysql:5.6
|
||||||
|
```
|
||||||
|
|
||||||
|
Here, we store data on the host system under `/my_dir/phpipam` and use a specific root password.
|
||||||
|
|
||||||
|
### Phpipam
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker run -ti -d -p 80:80 -e MYSQL_ENV_MYSQL_ROOT_PASSWORD=my-secret-pw --name ipam --link phpipam-mysql:mysql pierrecdn/phpipam
|
||||||
|
```
|
||||||
|
|
||||||
|
We are linking the two containers and exposing the HTTP port.
|
||||||
|
|
||||||
|
### First install scenario
|
||||||
|
|
||||||
|
* Browse to `http://<ip>[:<specific_port>]/install/`
|
||||||
|
* Step 1 : Choose 'Automatic database installation'
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
* Step 2 : Re-Enter connection information
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
* Note that these two first steps could be swapped by patching phpipam (see https://github.com/phpipam/phpipam/issues/25)
|
||||||
|
* Step 3 : Configure the admin user password
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
* You're done !
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Docker compose
|
||||||
|
|
||||||
|
You can also create an all-in-one YAML deployment descriptor with Docker compose, like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:5.6
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- db_data:/var/lib/mysql
|
||||||
|
ipam:
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
image: pierrecdn/phpipam
|
||||||
|
environment:
|
||||||
|
- MYSQL_ENV_MYSQL_USER=root
|
||||||
|
- MYSQL_ENV_MYSQL_ROOT_PASSWORD=my-secret-pw
|
||||||
|
- MYSQL_ENV_MYSQL_HOST=mysql
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
db_data:
|
||||||
|
```
|
||||||
|
|
||||||
|
And next :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also point the `MYSQL_ENV_PASSWORD_FILE` environment variable to a file,
|
||||||
|
in which case the contents of this file will be used as the password.
|
||||||
|
This makes it possible to use docker secrets for instance:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
ipam:
|
||||||
|
environment:
|
||||||
|
- MYSQL_ENV_MYSQL_PASSWORD_FILE=/run/secrets/phpipam_mysql_root_password
|
||||||
|
secrets:
|
||||||
|
- phpipam_mysql_root_password
|
||||||
|
```
|
||||||
|
|
||||||
|
The secret can be created by running `echo my-secret-pw | docker secret create phpipam_mysql_root_password -`
|
||||||
|
|
||||||
|
### Advanced Configuration
|
||||||
|
|
||||||
|
Here is the list of the available environment variables in the phpipam container, pass them to docker using `-e`.
|
||||||
|
None of them are actually needed to run the container, this is only to tweak the behavior.
|
||||||
|
|
||||||
|
| Environment variable | Default value | Description |
|
||||||
|
| ------------------------------ |:-------------:| --------------------------------------------------------------------------------------------------------:|
|
||||||
|
| MYSQL_ENV_MYSQL_HOST | mysql | The host used to reach the MySQL instance |
|
||||||
|
| MYSQL_ENV_MYSQL_USER | root | The user to connect the MySQL instance |
|
||||||
|
| MYSQL_ENV_MYSQL_ROOT_PASSWORD | (empty) | The MySQL password. Can be set using the Web UI during the first install |
|
||||||
|
| MYSQL_ENV_MYSQL_DB | phpipam | The name of the MySQL DB to connect to |
|
||||||
|
| MYSQL_ENV_MYSQL_PASSWORD_FILE | (empty) | A file containing the password (if not using MYSQL_ROOT_PASSWORD) this allows to leverage docker secrets |
|
||||||
|
| PHPIPAM_BASE | / | The base URI under which phpipam runs. Useful when performing rewrites with a reverse-proxy |
|
||||||
|
| GMAPS_API_KEY | (empty) | Google Maps API Key, used to display maps of your devices |
|
||||||
|
| GMAPS_API_GEOCODE_KEY | (empty) | Google Maps Geocode API Key, used to find coordinates from an address/ a location of your device |
|
||||||
|
|
||||||
|
### Specific integration (HTTPS, multi-host containers, etc.)
|
||||||
|
|
||||||
|
Regarding your requirements and docker setup, you've to expose resources.
|
||||||
|
|
||||||
|
For HTTPS, run a reverse-proxy in front of your phpipam container and link it to.
|
||||||
|
|
||||||
|
For multi-host containers, expose ports, run etcd or consul to make service discovery works etc.
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
phpIPAM is under heavy development by the amazing Miha.
|
||||||
|
To upgrade the release version, just change the `PHPIPAM_VERSION` environment variable to the target release (see [here](https://github.com/phpipam/phpipam/releases)).
|
@ -2,45 +2,43 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
phpipam-web:
|
web:
|
||||||
image: phpipam/phpipam-www:latest
|
image: phpipam/phpipam-www:latest
|
||||||
container_name: phpipam_www
|
container_name: ipam_www
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Berlin
|
- TZ=${TZ}
|
||||||
- IPAM_DATABASE_HOST=phpipam-mariadb
|
- IPAM_DATABASE_HOST=${MARIADB_HOST}
|
||||||
- IPAM_DATABASE_PASS=IPAMpass
|
- IPAM_DATABASE_PASS=${MARIADB_ROOT_PASSWORD}
|
||||||
- IPAM_DATABASE_WEBHOST=%
|
- IPAM_DATABASE_WEBHOST=%
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- phpipam-logo:/phpipam/css/images/logo
|
- ./volumes/logo:/phpipam/css/images/logo
|
||||||
depends_on:
|
depends_on:
|
||||||
- phpipam-mariadb
|
- mariadb
|
||||||
|
|
||||||
phpipam-cron:
|
cron:
|
||||||
image: phpipam/phpipam-cron:latest
|
image: phpipam/phpipam-cron:latest
|
||||||
container_name: phpipam_cron
|
container_name: ipam_cron
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/London
|
- TZ=${TZ}
|
||||||
- IPAM_DATABASE_HOST=phpipam-mariadb
|
- SCAN_INTERVAL=1
|
||||||
- IPAM_DATABASE_PASS=IPAMpass
|
- PHPIPAM_BASE=/
|
||||||
- SCAN_INTERVAL=1h
|
- MYSQL_ENV_MYSQL_USER=root
|
||||||
|
- MYSQL_ENV_MYSQL_DB=phpipam
|
||||||
|
- MYSQL_ENV_MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||||
|
- MYSQL_ENV_MYSQL_HOST=${MARIADB_HOST}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- phpipam-mariadb
|
- mariadb
|
||||||
|
|
||||||
phpipam-mariadb:
|
mariadb:
|
||||||
image: mariadb:latest
|
image: mariadb:latest
|
||||||
container_name: phpipam_db
|
container_name: ipam_db
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=IPAMrootpwd
|
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||||
- MARIADB_USER=phpipam-mariadb
|
|
||||||
- MARIADB_PASSWORD=IPAMpass
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- phpipam-db-data:/var/lib/mysql
|
- ./volumes/mariadb:/var/lib/mysql
|
||||||
|
|
||||||
volumes:
|
|
||||||
phpipam-db-data:
|
|
||||||
phpipam-logo:
|
|
||||||
|
72
ipam/php.ini
Normal file
72
ipam/php.ini
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
[PHP]
|
||||||
|
engine = On
|
||||||
|
short_open_tag = Off
|
||||||
|
precision = 14
|
||||||
|
output_buffering = 4096
|
||||||
|
zlib.output_compression = Off
|
||||||
|
implicit_flush = Off
|
||||||
|
serialize_precision = 17
|
||||||
|
zend.enable_gc = On
|
||||||
|
expose_php = Off
|
||||||
|
max_execution_time = 600
|
||||||
|
max_input_time = 60
|
||||||
|
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||||
|
display_errors = Off
|
||||||
|
log_errors = On
|
||||||
|
log_errors_max_len = 1024
|
||||||
|
default_mimetype = "text/html"
|
||||||
|
default_charset = "UTF-8"
|
||||||
|
file_uploads = On
|
||||||
|
upload_max_filesize = 2M
|
||||||
|
max_file_uploads = 20
|
||||||
|
allow_url_fopen = On
|
||||||
|
allow_url_include = Off
|
||||||
|
default_socket_timeout = 60
|
||||||
|
|
||||||
|
[Date]
|
||||||
|
date.timezone = "UTC"
|
||||||
|
|
||||||
|
[mail function]
|
||||||
|
smtp_port = 25
|
||||||
|
mail.add_x_header = On
|
||||||
|
|
||||||
|
[SQL]
|
||||||
|
sql.safe_mode = Off
|
||||||
|
|
||||||
|
[MySQLi]
|
||||||
|
mysqli.max_persistent = -1
|
||||||
|
mysqli.allow_persistent = On
|
||||||
|
mysqli.max_links = -1
|
||||||
|
mysqli.cache_size = 2000
|
||||||
|
mysqli.default_port = 3306
|
||||||
|
mysqli.reconnect = Off
|
||||||
|
|
||||||
|
[mysqlnd]
|
||||||
|
mysqlnd.collect_statistics = On
|
||||||
|
mysqlnd.collect_memory_statistics = Off
|
||||||
|
|
||||||
|
[Session]
|
||||||
|
session.save_handler = files
|
||||||
|
session.use_strict_mode = 0
|
||||||
|
session.use_cookies = 1
|
||||||
|
session.use_only_cookies = 1
|
||||||
|
session.name = PHPSESSID
|
||||||
|
session.auto_start = 0
|
||||||
|
session.cookie_lifetime = 0
|
||||||
|
session.cookie_path = /
|
||||||
|
session.cookie_domain =
|
||||||
|
session.cookie_httponly =
|
||||||
|
session.serialize_handler = php
|
||||||
|
session.gc_probability = 1
|
||||||
|
session.gc_divisor = 1000
|
||||||
|
session.gc_maxlifetime = 1440
|
||||||
|
session.cache_limiter = nocache
|
||||||
|
session.cache_expire = 180
|
||||||
|
session.use_trans_sid = 0
|
||||||
|
session.hash_function = 0
|
||||||
|
session.hash_bits_per_character = 5
|
||||||
|
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
|
||||||
|
|
||||||
|
[ldap]
|
||||||
|
ldap.max_links = -1
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
MW_SCRIPT_PATH=/w
|
||||||
|
MW_SERVER=http://localhost:8080
|
||||||
|
MW_DOCKER_PORT=8080
|
||||||
|
MEDIAWIKI_USER=Admin
|
||||||
|
MEDIAWIKI_PASSWORD=dockerpass
|
||||||
|
XDEBUG_CONFIG=
|
||||||
|
XDEBUG_ENABLE=true
|
||||||
|
XHPROF_ENABLE=true
|
||||||
|
MYSQL_DATABASE: my_wiki
|
||||||
|
MYSQL_USER: wikiuser
|
||||||
|
MYSQL_PASSWORD: example
|
||||||
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
@ -6,7 +6,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
mediawiki:
|
mediawiki:
|
||||||
image: mediawiki
|
image: mediawiki
|
||||||
container_name: mediawiki
|
container_name: wiki
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8070:80
|
- 8070:80
|
||||||
@ -21,11 +21,11 @@ services:
|
|||||||
# This key also defines the name of the database host used during setup instead of the default "localhost"
|
# This key also defines the name of the database host used during setup instead of the default "localhost"
|
||||||
database:
|
database:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
container_name: mediawiki_db
|
container_name: wikidb
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
|
# @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
|
||||||
MYSQL_DATABASE: my_wiki
|
MYSQL_DATABASE: wiki
|
||||||
MYSQL_USER: wikiuser
|
MYSQL_USER: wikiuser
|
||||||
MYSQL_PASSWORD: example
|
MYSQL_PASSWORD: example
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||||
|
13
portainer/docker-compose.yaml
Normal file
13
portainer/docker-compose.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
version: '2.4'
|
||||||
|
|
||||||
|
services:
|
||||||
|
portainer:
|
||||||
|
image: portainer/portainer-ce:latest
|
||||||
|
container_name: portainer
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
|
- 9443:9443
|
||||||
|
volumes:
|
||||||
|
- ./portainer_data:/data
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
Binary file not shown.
10
portainer/portainer_data/certs/cert.pem
Normal file
10
portainer/portainer_data/certs/cert.pem
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIBUTCB+aADAgECAhEAzCMCoLriIwCpK0RgVPPPHjAKBggqhkjOPQQDAjAAMB4X
|
||||||
|
DTIzMDMyOTEyMzEzMVoXDTI4MDMyOTEyMzEzMVowADBZMBMGByqGSM49AgEGCCqG
|
||||||
|
SM49AwEHA0IABEEA1sLZGRfK6R+njkEq9LD/M41FAMI7pg/J8GDvaSexeuXh0qAL
|
||||||
|
K4pmvBD4E4chJ0KRNjnU4whzUUEKoLRKcx6jVDBSMA4GA1UdDwEB/wQEAwIFoDAT
|
||||||
|
BgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMB0GA1UdEQEB/wQTMBGC
|
||||||
|
CWxvY2FsaG9zdIcEAAAAADAKBggqhkjOPQQDAgNHADBEAiBXgeviCYcEiMHJPhxN
|
||||||
|
7psUVVXHZqBt/RsaLWDEVqe5HQIgfdQoCHvcq5wUQMRF7YlrIJP20eoqqZRWDB8V
|
||||||
|
mFAjBEU=
|
||||||
|
-----END CERTIFICATE-----
|
5
portainer/portainer_data/certs/key.pem
Normal file
5
portainer/portainer_data/certs/key.pem
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
MHcCAQEEINMkRbyAA37Se5V+cDZezaaqTnqQUmHu3sQdwHQbefRyoAoGCCqGSM49
|
||||||
|
AwEHoUQDQgAEQQDWwtkZF8rpH6eOQSr0sP8zjUUAwjumD8nwYO9pJ7F65eHSoAsr
|
||||||
|
ima8EPgThyEnQpE2OdTjCHNRQQqgtEpzHg==
|
||||||
|
-----END EC PRIVATE KEY-----
|
1
portainer/portainer_data/docker_config/config.json
Normal file
1
portainer/portainer_data/docker_config/config.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"HttpHeaders":{"X-PortainerAgent-ManagerOperation":"1","X-PortainerAgent-PublicKey":"3059301306072a8648ce3d020106082a8648ce3d0301070342000423ff2b462113e7f1160b2b5928fcb7592035fa30484cfffad090b78e8b61e086902b50a90caae2af5b509e7b7dadb621523c2571389873b6c785061fe575cabc","X-PortainerAgent-Signature":"fLj8HUSCLaCcOMB3KHzUldHNM23swq8vIBieHAjoVSF57u7ASFq+7J3L80WeoM2BszFYySxsziUt4WI5fCr7GQ"}}
|
BIN
portainer/portainer_data/portainer.db
Normal file
BIN
portainer/portainer_data/portainer.db
Normal file
Binary file not shown.
5
portainer/portainer_data/portainer.key
Normal file
5
portainer/portainer_data/portainer.key
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
MHcCAQEEIHyUg5CHWXExcAV5z+RPx+B0XB1FFuPrxN7eD/xBV62NoAoGCCqGSM49
|
||||||
|
AwEHoUQDQgAEI/8rRiET5/EWCytZKPy3WSA1+jBITP/60JC3joth4IaQK1CpDKri
|
||||||
|
r1tQnnt9rbYhUjwlcTiYc7bHhQYf5XXKvA==
|
||||||
|
-----END EC PRIVATE KEY-----
|
4
portainer/portainer_data/portainer.pub
Normal file
4
portainer/portainer_data/portainer.pub
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-----BEGIN ECDSA PUBLIC KEY-----
|
||||||
|
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEI/8rRiET5/EWCytZKPy3WSA1+jBI
|
||||||
|
TP/60JC3joth4IaQK1CpDKrir1tQnnt9rbYhUjwlcTiYc7bHhQYf5XXKvA==
|
||||||
|
-----END ECDSA PUBLIC KEY-----
|
@ -2,7 +2,7 @@ MYSQL_ROOT_PASSWORD=Holdiom,snipeit,root
|
|||||||
MYSQL_DATABASE=snipeit
|
MYSQL_DATABASE=snipeit
|
||||||
MYSQL_USER=snipeit
|
MYSQL_USER=snipeit
|
||||||
MYSQL_PASSWORD=Holdiom,snipeit
|
MYSQL_PASSWORD=Holdiom,snipeit
|
||||||
MYSQL_PORT_3306_TCP_ADDR=snipeit-db
|
MYSQL_PORT_3306_TCP_ADDR=snipe_db
|
||||||
MYSQL_PORT_3306_TCP_PORT=3306
|
MYSQL_PORT_3306_TCP_PORT=3306
|
||||||
MAIL_PORT_587_TCP_ADDR=192.168.75.25
|
MAIL_PORT_587_TCP_ADDR=192.168.75.25
|
||||||
MAIL_PORT_587_TCP_PORT=587
|
MAIL_PORT_587_TCP_PORT=587
|
||||||
@ -14,6 +14,6 @@ MAIL_ENV_PASSWORD=pass
|
|||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
APP_DEBUG=false
|
APP_DEBUG=false
|
||||||
APP_KEY=base64:i/+ZvT6C4LEWcBNL7vWwicRVtEt05pv22RhWMJy+yZ8=
|
APP_KEY=base64:i/+ZvT6C4LEWcBNL7vWwicRVtEt05pv22RhWMJy+yZ8=
|
||||||
APP_URL=http://it.ostrach.tld:8090
|
APP_URL=http://itmgmt.ostrach.tld:8090
|
||||||
APP_TIMEZONE=Europe/Berlin
|
APP_TIMEZONE=Europe/Berlin
|
||||||
APP_LOCALE=de
|
APP_LOCALE=de
|
||||||
|
1
snipeit/.gitignore
vendored
Normal file
1
snipeit/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
./volumes/**
|
@ -3,18 +3,18 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:latest
|
image: mariadb:latest
|
||||||
container_name: snipeit-db
|
container_name: snipe_db
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- db:/var/lib/mysql
|
- ./volumes/db:/var/lib/mysql
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: snipe/snipe-it:latest
|
image: snipe/snipe-it:latest
|
||||||
container_name: snipeit-app
|
container_name: snipe_app
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
ports:
|
ports:
|
||||||
@ -22,7 +22,4 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
volumes:
|
|
||||||
db:
|
|
||||||
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
MYSQL_ROOT_PASSWORD=Holdiom,snipeit,root
|
|
||||||
MYSQL_DATABASE=snipeit
|
|
||||||
MYSQL_USER=snipeit
|
|
||||||
MYSQL_PASSWORD=Holdiom,snipeit
|
|
||||||
MYSQL_PORT_3306_TCP_ADDR=snipeit-db
|
|
||||||
MYSQL_PORT_3306_TCP_PORT=3306
|
|
||||||
MAIL_PORT_587_TCP_ADDR=192.168.75.25
|
|
||||||
MAIL_PORT_587_TCP_PORT=587
|
|
||||||
MAIL_ENV_FROM_ADDR=it@hochvogel.de
|
|
||||||
MAIL_ENV_FROM_NAME=Snipe-IT
|
|
||||||
MAIL_ENV_ENCRYPTION=tcp
|
|
||||||
MAIL_ENV_USERNAME=user
|
|
||||||
MAIL_ENV_PASSWORD=pass
|
|
||||||
APP_ENV=production
|
|
||||||
APP_DEBUG=false
|
|
||||||
APP_KEY=base64:i/+ZvT6C4LEWcBNL7vWwicRVtEt05pv22RhWMJy+yZ8=
|
|
||||||
APP_URL=http://it.ostrach.tld:8090
|
|
||||||
APP_TIMEZONE=Europe/Berlin
|
|
||||||
APP_LOCALE=de
|
|
1
speedtest/.gitignore
vendored
Normal file
1
speedtest/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
./volumes/**
|
@ -6,7 +6,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 8765:80
|
- 8765:80
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/data:/config
|
- ./volumes/config:/config
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Berlin
|
- TZ=Europe/Berlin
|
||||||
- PGID=
|
- PGID=
|
||||||
@ -17,4 +17,4 @@ services:
|
|||||||
options:
|
options:
|
||||||
max-file: "10"
|
max-file: "10"
|
||||||
max-size: "200k"
|
max-size: "200k"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -41,6 +41,10 @@ stop)
|
|||||||
compose "docker compose stop"
|
compose "docker compose stop"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
cleanup)
|
||||||
|
compose "rm ./volumes/* -rf"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 [start|stop|down]"
|
echo "Usage: $0 [start|stop|down]"
|
||||||
;;
|
;;
|
||||||
|
14
zabbix/.env
14
zabbix/.env
@ -0,0 +1,14 @@
|
|||||||
|
MYSQL_ROOT_PASSWORD=zabbixrootsqlsecret
|
||||||
|
MYSQL_USER=zabbix
|
||||||
|
MYSQL_PASSWORD=zabbixsqlsecret
|
||||||
|
MYSQL_DATABASE=zabbix
|
||||||
|
DB_SERVER_HOST=zbxdb
|
||||||
|
DB_SERVER_PORT=3306
|
||||||
|
ZBX_DEBUGLEVEL=3
|
||||||
|
ZBX_SERVER_HOST="zabbix"
|
||||||
|
PHP_TZ="Europe/Berlin"
|
||||||
|
SERVER_NAME=itmgmt.ostrach.tld
|
||||||
|
ZBX_SERVER_HOST=zabbix
|
||||||
|
ZBX_HOSTNAME=agent2
|
||||||
|
ZBX_STARTAGENTS=5
|
||||||
|
|
1
zabbix/.gitignore
vendored
Normal file
1
zabbix/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
./volumes/**
|
@ -4,69 +4,65 @@ version: '3.3'
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:latest
|
image: mariadb:10.7.8
|
||||||
container_name: zabbix-db
|
container_name: zbxdb
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=zabbixrootsqlsecret
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||||
- MYSQL_USER=zabbix
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=zabbixsqlsecret
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_DATABASE=zabbix
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- DB_SERVER_HOST=zabbix-db
|
- DB_SERVER_HOST=${DB_SERVER_HOST}
|
||||||
- DB_SERVER_PORT=3306
|
- DB_SERVER_PORT=${DB_SERVER_PORT}
|
||||||
- ZBX_DEBUGLEVEL=3
|
- ZBX_DEBUGLEVEL=${ZBX_DEBUGLEVEL}
|
||||||
- ZBX_SERVER_HOST=zabbix-server
|
- ZBX_SERVER_HOST=${ZBX_SERVER_HOST}
|
||||||
cap_add:
|
cap_add:
|
||||||
- SYS_NICE # CAP_SYS_NICE
|
- SYS_NICE # CAP_SYS_NICE
|
||||||
volumes:
|
volumes:
|
||||||
- db:/var/lib/mysql
|
- ./volumes/db:/var/lib/mysql
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: zabbix/zabbix-server-mysql
|
image: zabbix/zabbix-server-mysql
|
||||||
container_name: zabbix-server
|
container_name: zabbix
|
||||||
ports:
|
ports:
|
||||||
- "10051:10051"
|
- "10051:10051"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- SERVER_NAME=server
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||||
- MYSQL_ROOT_PASSWORD=zabbixrootsqlsecret
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_USER=zabbix
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_PASSWORD=zabbixsqlsecret
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- MYSQL_DATABASE=zabbix
|
- DB_SERVER_HOST=${DB_SERVER_HOST}
|
||||||
- DB_SERVER_HOST=zabbix-db
|
- DB_SERVER_PORT=${DB_SERVER_PORT}
|
||||||
- DB_SERVER_PORT=3306
|
- ZBX_DEBUGLEVEL=${ZBX_DEBUGLEVEL}
|
||||||
- ZBX_DEBUGLEVEL=3
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
image: zabbix/zabbix-agent2
|
image: zabbix/zabbix-agent2
|
||||||
container_name: zabbix-agent2
|
container_name: zbxagent2
|
||||||
privileged: true
|
privileged: true
|
||||||
environment:
|
environment:
|
||||||
- ZBX_SERVER_HOST=zabbix-server
|
- ZBX_SERVER_HOST=${ZBX_SERVER_HOST}
|
||||||
- ZBX_HOSTNAME=zabbix-agent2
|
- ZBX_HOSTNAME=${ZBX_HOSTNAME}
|
||||||
- ZBX_STARTAGENTS=3
|
- ZBX_STARTAGENTS=${ZBX_STARTAGENTS}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: zabbix/zabbix-web-apache-mysql
|
image: zabbix/zabbix-web-apache-mysql
|
||||||
container_name: zabbix-web
|
container_name: zbxweb
|
||||||
ports:
|
ports:
|
||||||
- "8085:8080"
|
- "8085:8080"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_USER=zabbix
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=zabbixsqlsecret
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_DATABASE=zabbix
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- DB_SERVER_HOST=zabbix-db
|
- DB_SERVER_HOST=${DB_SERVER_HOST}
|
||||||
- DB_SERVER_PORT=3306
|
- DB_SERVER_PORT=${DB_SERVER_PORT}
|
||||||
- ZBX_DEBUGLEVEL=3
|
- ZBX_DEBUGLEVEL=${ZBX_DEBUGLEVEL}
|
||||||
- ZBX_SERVER_HOST=zabbix-server
|
- ZBX_SERVER_HOST=${ZBX_SERVER_HOST}
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
volumes:
|
|
||||||
db:
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
MYSQL_ROOT_PASSWORD=zabbixrootsqlsecret
|
|
||||||
MYSQL_USER=zabbix
|
|
||||||
MYSQL_PASSWORD=zabbixsqlsecret
|
|
||||||
MYSQL_DATABASE=zabbix
|
|
||||||
DB_SERVER_HOST=zabbix-db
|
|
||||||
DB_SERVER_PORT=3306
|
|
||||||
ZBX_DEBUGLEVEL=3
|
|
||||||
ZBX_SERVER_HOST="zabbix-server"
|
|
||||||
PHP_TZ="Europe/Berlin"
|
|
Loading…
x
Reference in New Issue
Block a user