代码拉取完成,页面将自动刷新
同步操作将从 se1per/docker-compose-php-lnmp-swoole 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
version: '3.8'
services:
php:
build:
context: ./php/php8
container_name: ${CONTAINER_NAME_PREFIX}-php
expose:
- 9000
volumes:
- "/www/app:/var/www/html:rw"
#挂载php配置文件
- "/www/php/php8/conf:/etc/php8"
#挂载php日志
- "/www/php/php8/logs:/var/log/php8"
stdin_open: true
tty: true
depends_on:
- redis
- db
networks:
- app_net
nginx:
# image: nginx:${NGINX_TAG}
image: nginx:${NGINX_TAG}-alpine
container_name: ${CONTAINER_NAME_PREFIX}-nginx
# 挂载宿主机端口8030
ports:
- "${NGINX_PORT}:80"
- "443:443"
volumes:
# 挂载nginx目录
- "/www/app:/var/www/html:rw"
# 挂载nginx日志
- "/www/nginx/logs:/var/log/nginx:rw"
# 挂载nginx配置文件
- "/www/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro"
# 挂载虚拟主机配置文件
- "/www/nginx/conf/conf.d:/etc/nginx/conf.d/:ro"
# 映射ssl
- "/www/nginx/certs:/etc/nginx/certs/:ro"
environment:
- TZ=Asia/Shanghai
depends_on:
- php
restart: always
networks:
- app_net
db:
image: ${DB_NAME}
container_name: ${CONTAINER_NAME_PREFIX}-mysql
# 暴露端口
ports:
- "${MYSQL_PORT}:3306"
# 数据库数据挂载
volumes:
- "/www/db/${DB_PATH}/init:/docker-entrypoint-initdb.d"
- "/www/db/${DB_PATH}/data:/var/lib/mysql"
- "/www/db/${DB_PATH}/logs:/var/log/mysql"
- "/www/db/${DB_PATH}/my.cnf:/etc/my.cnf"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
command: --default-authentication-plugin=mysql_native_password
restart: always
networks:
- app_net
redis:
image: redis:${REDIS_TAG}-alpine
container_name: ${CONTAINER_NAME_PREFIX}-redis
ports:
- "${REDIS_PORT}:6379"
volumes:
- "/www/redis/conf:/etc/redis"
- "/www/redis/data:/data"
command: redis-server /etc/redis/redis.conf
restart: always
networks:
- app_net
portainer:
image: portainer/portainer:latest
container_name: ${CONTAINER_NAME_PREFIX}-portainer
ports:
- "9030:9000"
volumes:
- /www/portainer/data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
app_net:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。