81 lines
1.9 KiB
YAML
81 lines
1.9 KiB
YAML
|
#Указывается версия docker-compose
|
||
|
version: "3"
|
||
|
|
||
|
#Описываем сервисы
|
||
|
services:
|
||
|
|
||
|
#Сервис drupal
|
||
|
drupal:
|
||
|
#Докер образ
|
||
|
image: drupal:latest
|
||
|
#Маппинг портов - Порт хоста:порт внутри контейнера
|
||
|
ports:
|
||
|
- 8004:80
|
||
|
#Вольюмы для сохранение данных после смерти контейнера
|
||
|
volumes:
|
||
|
- drupal_modules:/var/www/html/modules
|
||
|
- drupal_profiles:/var/www/html/profiles
|
||
|
- drupal_themes:/var/www/html/themes
|
||
|
- drupal_sites:/var/www/html/sites
|
||
|
#рестарт политика
|
||
|
restart: always
|
||
|
|
||
|
postgres:
|
||
|
image: postgres:12
|
||
|
#Указываем переменные среды
|
||
|
environment:
|
||
|
POSTGRES_PASSWORD: your_postgres_password
|
||
|
ports:
|
||
|
- 5433:5432
|
||
|
volumes:
|
||
|
- db_data:/var/lib/postgresql/data
|
||
|
restart: always
|
||
|
|
||
|
wiki:
|
||
|
image: mediawiki:lts
|
||
|
ports:
|
||
|
- 9999:80
|
||
|
#Зависимости от других сервисов
|
||
|
links:
|
||
|
- database
|
||
|
restart: unless-stopped
|
||
|
volumes:
|
||
|
- ./images:/var/www/html/images
|
||
|
|
||
|
database:
|
||
|
image: mariadb
|
||
|
environment:
|
||
|
MYSQL_DATABASE: 'wiki'
|
||
|
MYSQL_USER: 'wikiuser234234'
|
||
|
MYSQL_PASSWORD: 'password'
|
||
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||
|
volumes:
|
||
|
- ./database_wiki:/var/lib/mysql
|
||
|
restart: unless-stopped
|
||
|
|
||
|
wordpress:
|
||
|
image: wordpress
|
||
|
links:
|
||
|
- mariadb:mysql
|
||
|
environment:
|
||
|
- WORDPRESS_DB_PASSWORD=password
|
||
|
- WORDPRESS_DB_USER=root
|
||
|
ports:
|
||
|
- 8005:80
|
||
|
volumes:
|
||
|
- ./html:/var/www/html
|
||
|
mariadb:
|
||
|
image: mariadb
|
||
|
environment:
|
||
|
- MYSQL_ROOT_PASSWORD=password
|
||
|
- MYSQL_DATABASE=wordpress
|
||
|
volumes:
|
||
|
- ./database_wp:/var/lib/mysql
|
||
|
|
||
|
#Описание вольюмов
|
||
|
volumes:
|
||
|
drupal_modules:
|
||
|
drupal_profiles:
|
||
|
drupal_themes:
|
||
|
drupal_sites:
|
||
|
db_data:
|