代码拉取完成,页面将自动刷新
version: '2.1'
services:
### Nginx Web Container #######################################
nginx:
build: ./nginx
container_name: lnmp-nginx
ports:
- "80:80"
- "443:443"
#source code container
volumes_from:
- www
volumes:
- "./nginx/logs:/var/log/nginx"
- "./nginx/socket:/var/run"
links:
- php-fpm:php-fpm
networks:
web_server_network:
ipv4_address: ${NGINX_WEB_SERVER_IP}
### PHP-FPM Container #######################################
php-fpm:
image: bravist/php-fpm-alpine-aliyun-app:1.16
container_name: lnmp-php-fpm
#source code container
volumes_from:
- www
volumes:
- "./nginx/logs/php-fpm:/usr/local/var/log/php7"
- "./nginx/socket:/var/run"
links:
- mariadb
- redis
#https://github.com/laradock/laradock/issues/435
extra_hosts:
- "${PHP_FPM_DOMAIN}:${NGINX_WEB_SERVER_IP}"
- "${PHP_FPM_DOMAIN2}:${NGINX_WEB_SERVER_IP}"
- "${PHP_FPM_DOMAIN3}:${NGINX_WEB_SERVER_IP}"
- "${PHP_FPM_DOMAIN4}:${NGINX_WEB_SERVER_IP}"
- "${PHP_FPM_DOMAIN5}:${NGINX_WEB_SERVER_IP}"
- "${PHP_FPM_DOMAIN6}:${NGINX_WEB_SERVER_IP}"
env_file:
- .env
networks:
- web_server_network
### PHP-SUPERVISOR Container #######################################
php-supervisor:
build: ./php-supervisor
container_name: lnmp-php-supervisor
volumes:
- ./php-supervisor/supervisor/log:/var/log/supervisor
- ./php-supervisor/supervisor:/etc/supervisor/conf.d
volumes_from:
- www
links:
- mariadb
- redis
extra_hosts:
- "${SUPERVISOR_DOMAIN}:${NGINX_WEB_SERVER_IP}"
- "${SUPERVISOR_DOMAIN2}:${NGINX_WEB_SERVER_IP}"
- "${SUPERVISOR_DOMAIN3}:${NGINX_WEB_SERVER_IP}"
- "${SUPERVISOR_DOMAIN4}:${NGINX_WEB_SERVER_IP}"
- "${SUPERVISOR_DOMAIN5}:${NGINX_WEB_SERVER_IP}"
- "${SUPERVISOR_DOMAIN6}:${NGINX_WEB_SERVER_IP}"
env_file:
- .env
networks:
- web_server_network
### CALL-WEBSOCKET Container #######################################
call-websocket:
build: ./call-websocket
container_name: lnmp-call-websocket
volumes_from:
- www
ports:
- "8190:8190"
- "8191:8191"
networks:
- web_server_network
### PHP-CROND Container #######################################
php-crond:
build: ./php-crond
container_name: lnmp-php-crond
volumes_from:
- "www"
volumes:
- "./php-crond/crontabs:/var/log/cron"
networks:
- web_server_network
### MariaDB Container #######################################
# MariaDB - One of the most popular database servers. Made by the original developers of MySQL. Guaranteed to stay open source.
mariadb:
image: mariadb:10.2
container_name: lnmp-mariadb
ports:
- "3306:3306"
volumes:
# NOTE: your data will be stored in ./mysql
- ./mariadb/data/mysql:/var/lib/mysql
environment:
- MYSQL_DATABASE=mysql
- MYSQL_USER=developer
- MYSQL_PASSWORD=developer
- MYSQL_ROOT_PASSWORD=developer
networks:
- web_server_network
### REDIS Container #######################################
redis:
build: ./redis
container_name: lnmp-redis
ports:
- "6379:6379"
volumes:
- "./redis/data:/data"
environment:
- REDIS_PASSWORD=developer
networks:
- web_server_network
### Web-Root Container #######################################
www:
image: tianon/true
container_name: lnmp-www
volumes:
- ./www:/usr/share/nginx/html
### Networks Setup ############################################
networks:
web_server_network:
driver: bridge
ipam:
driver: default
config:
- subnet: "${WEB_SERVER_SUBNET}"
gateway: "${WEB_SERVER_GATEWAY}"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。