1 Star 1 Fork 0

lolfans/lnmp-docker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yml 3.79 KB
一键复制 编辑 原始数据 按行查看 历史
程会勇 提交于 2018-03-08 19:55 . update readme.md
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}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lolfans/lnmp-docker.git
[email protected]:lolfans/lnmp-docker.git
lolfans
lnmp-docker
lnmp-docker
master

搜索帮助