代码拉取完成,页面将自动刷新
version: "3.5"
services:
web:
# image: nginx:latest
container_name: fortuna-web
ports:
- ${APP_PORT}:80
depends_on:
- php-fpm
build:
context: ./front-end
dockerfile: Dockerfile
networks:
- fortuna-network
restart: always
environment:
NGINX_HOST: ${APP_HOST}
NGINX_PORT: 80
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/front-end.conf.template > /etc/nginx/conf.d/front-end.conf && exec nginx -g 'daemon off;'"
volumes:
- type: bind
source: ./back-end/public/
target: /usr/share/nginx/html/back-end/public/
read_only: true
- type: bind
source: ./docker/nginx/conf.d/
target: /etc/nginx/conf.d/
- type: bind
source: ./docker/logs/nginx/
target: /var/log/nginx/
# read_only: true
composer:
image: composer
command: install
volumes:
- type: bind
source: ./back-end
target: /app
db:
image: mysql:5.7
networks:
- fortuna-network
environment:
MYSQL_ROOT_PASSWORD: 123123
MYSQL_DATABASE: fortuna
container_name: fortuna-db
restart: always
volumes:
- type: bind
source: ./docker/mysql/_data
target: /var/lib/mysql
# - type: bind
# source: ./docker/mysql/conf.d/
# target: /etc/mysql/conf.d/
- type: bind
source: ./docker/logs/mysql/
target: /var/log/mysql/
php-fpm:
container_name: fortuna-php-fpm
build:
context: ./back-end
dockerfile: Dockerfile
depends_on:
- db
networks:
- fortuna-network
restart: always
volumes:
- type: bind
source: ./back-end/
target: /var/www/html/
- type: bind
source: ./docker/logs/php-fpm/
target: /var/log/
networks:
fortuna-network:
driver: bridge
volumes:
db-volume:
# logs-volume:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。