This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
executable file
·81 lines (74 loc) · 2.4 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Версия docker-compose
version: '3'
# Список наших сервисов (контейнеров)
services:
nginx:
# используем последний стабильный образ nginx
build: services/nginx
restart: unless-stopped
# маршрутизируем порты
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
- "${NGINX_HOST_HTTPS_PORT}:443"
# монтируем директории, слева директории на основной машине, справа - куда они монтируются в контейнере
volumes:
- ./services/nginx:/etc/nginx/conf.d
- "${APP_HOST_PATH}:/var/www"
- ./data/nginx:/var/log/nginx
php:
# у нас свой образ для PHP, указываем путь к нему и говорим что его надо собрать
build: services/php
restart: unless-stopped
# монтируем директорию с проектами
volumes:
- "${APP_HOST_PATH}:/var/www"
memcached:
image: bitnami/memcached:1.5.12
ports:
- "${MEMCACHED_HOST_PORT}:11211"
volumes:
- ./services/memcached/memcached.conf:/etc/memcached.conf
- ./data/memcached/memcached.log:/var/log/memcached.log
mariadb:
build: services/mariadb
restart: unless-stopped
ports:
- "${MYSQL_HOST_PORT}:3306"
- 2710:2710
volumes:
- ./data/mariadb:/var/lib/mysql
- "${APP_HOST_PATH}/sql/main.sql:/docker-entrypoint-initdb.d/01-main.sql"
- ./migrations/02-create-users.sql:/docker-entrypoint-initdb.d/02-create-users.sql
environment:
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
phpmyadmin:
image: phpmyadmin/phpmyadmin:4.8
depends_on:
- mariadb
environment:
PMA_ARBITRARY: 1
PMA_HOST: mariadb
PMA_PORT: 3306
ports:
- "${PMA_HOST_PORT}:80"
volumes:
- ./services/phpmyadmin:/etc/phpmyadmin
# xbt_tracker:
# container_name: xbt_tracker
# build: services/xbt_tracker
# depends_on:
# - mariadb
# ports:
# - 2710:2710
sphinx:
build: services/sphinx
restart: unless-stopped
depends_on:
- mariadb
volumes:
- ./data/sphinx:/var/log/sphinxsearch
# - ./sphinx/sphinx.conf:/etc/sphinxsearch/sphinx.conf
# - ./sphinxsearch:/var/lib/sphinxsearch/data