119 lines
3.0 KiB
YAML
119 lines
3.0 KiB
YAML
|
|
version: "3"
|
||
|
|
services:
|
||
|
|
www:
|
||
|
|
build: .
|
||
|
|
container_name: WebHost
|
||
|
|
restart: on-failure
|
||
|
|
ports:
|
||
|
|
- "80:80"
|
||
|
|
- "443:443"
|
||
|
|
- "9003:9003"
|
||
|
|
hostname: joywork.dev
|
||
|
|
volumes:
|
||
|
|
- ./apache2/sites-enabled:/etc/apache2/sites-enabled
|
||
|
|
- ./logs/apache:/var/log/apache2
|
||
|
|
- ../:/var/www/html/
|
||
|
|
- ../pdf:/var/www/html/pdf
|
||
|
|
- ../photos:/var/www/html/photos
|
||
|
|
- ../upload:/var/www/html/upload
|
||
|
|
links:
|
||
|
|
- db
|
||
|
|
networks:
|
||
|
|
- default
|
||
|
|
|
||
|
|
db:
|
||
|
|
image: mysql:8.0
|
||
|
|
container_name: DataBase
|
||
|
|
restart: on-failure
|
||
|
|
ports:
|
||
|
|
- "3306:3306"
|
||
|
|
networks:
|
||
|
|
- default
|
||
|
|
hostname: db
|
||
|
|
volumes:
|
||
|
|
- ./mysql/data:/var/lib/mysql
|
||
|
|
- ./dump:/docker-entrypoint-initdb.d
|
||
|
|
- ./logs/mysql:/var/log/mysql
|
||
|
|
- ./mysql/my.cnf:/etc/mysql/my.cnf
|
||
|
|
environment:
|
||
|
|
- MYSQL_ROOT_PASSWORD=root
|
||
|
|
- MYSQL_DATABASE=u0305746_jw
|
||
|
|
- MYSQL_USER=dbuser
|
||
|
|
- MYSQL_PASSWORD=root
|
||
|
|
- MYSQL_ROOT_HOST=%
|
||
|
|
expose:
|
||
|
|
- '3306'
|
||
|
|
|
||
|
|
phpmyadmin:
|
||
|
|
image: phpmyadmin/phpmyadmin
|
||
|
|
container_name: phpMyAdmin
|
||
|
|
restart: on-failure
|
||
|
|
ports:
|
||
|
|
- "8085:80"
|
||
|
|
depends_on:
|
||
|
|
- db
|
||
|
|
links:
|
||
|
|
- db:db
|
||
|
|
volumes:
|
||
|
|
- /sessions
|
||
|
|
networks:
|
||
|
|
- default
|
||
|
|
environment:
|
||
|
|
PMA_HOST: db
|
||
|
|
PMA_PORT: 3306
|
||
|
|
MYSQL_USER: dbuser
|
||
|
|
MYSQL_PASSWORD: root
|
||
|
|
MYSQL_ROOT_PASSWORD: root
|
||
|
|
|
||
|
|
sphinx:
|
||
|
|
image: macbre/sphinxsearch:3.4.1
|
||
|
|
container_name: BigSphinx
|
||
|
|
restart: on-failure
|
||
|
|
depends_on:
|
||
|
|
- db
|
||
|
|
ports:
|
||
|
|
- "9312:9312"
|
||
|
|
- "9306:9306"
|
||
|
|
networks:
|
||
|
|
- default
|
||
|
|
command: >
|
||
|
|
sh -c "until nc -z db 3306; do sleep 5; done &&
|
||
|
|
mkdir -p /opt/sphinx/index &&
|
||
|
|
chmod -R 777 /opt/sphinx/index &&
|
||
|
|
chown -R 999:999 /opt/sphinx/index &&
|
||
|
|
indexer --all -c /opt/sphinx/conf/sphinx.conf &&
|
||
|
|
indexer --all -c /opt/sphinx/conf/sphinx_delta.conf &&
|
||
|
|
searchd --nodetach --config /opt/sphinx/conf/sphinx.conf &&
|
||
|
|
searchd --nodetach --config /opt/sphinx/conf/sphinx_delta.conf"
|
||
|
|
hostname: sphinx
|
||
|
|
volumes:
|
||
|
|
- ./sphinx/index:/opt/sphinx/index
|
||
|
|
- ./logs:/opt/sphinx/log
|
||
|
|
- ./sphinx/conf/sphinx.conf:/opt/sphinx/conf/sphinx.conf
|
||
|
|
- ./sphinx/conf/sphinx_delta.conf:/opt/sphinx/conf/sphinx_delta.conf
|
||
|
|
- ./sphinx/binlog:/opt/sphinx/binlog
|
||
|
|
|
||
|
|
sphinx2:
|
||
|
|
image: macbre/sphinxsearch:3.4.1
|
||
|
|
container_name: SmallSphinx
|
||
|
|
restart: on-failure
|
||
|
|
depends_on:
|
||
|
|
- db
|
||
|
|
networks:
|
||
|
|
- default
|
||
|
|
command: >
|
||
|
|
sh -c "until nc -z db 3306; do sleep 5; done &&
|
||
|
|
mkdir -p /opt/sphinx/index &&
|
||
|
|
chmod -R 777 /opt/sphinx/index &&
|
||
|
|
chown -R 999:999 /opt/sphinx/index &&
|
||
|
|
indexer --all -c /opt/sphinx/conf/sphinx.conf &&
|
||
|
|
searchd --nodetach --config /opt/sphinx/conf/sphinx.conf"
|
||
|
|
hostname: sphinx2
|
||
|
|
volumes:
|
||
|
|
- ./sphinx2/index:/opt/sphinx/index
|
||
|
|
- ./logs:/opt/sphinx/log
|
||
|
|
- ./sphinx2/conf/sphinx.conf:/opt/sphinx/conf/sphinx.conf
|
||
|
|
- ./sphinx2/binlog:/opt/sphinx/binlog
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
persistent:
|