我是新来的Docker, 现在我要使用 spateie/laravel- backup
软件包来备份我的工程和数据库 。
mysqldump
命令
当我在DB容器内运行 mysqldump
命令时,我可以适当地使用它,但在Php容器内找不到这个命令。
这是我的docker-compact.yml
:
version: 2
services:
project-db:
image: mariadb:10.3.35
container_name: project-db
volumes:
- ./.configs/mysql_data:/var/lib/mysql
ports:
- "3309:3306"
env_file:
- ./.configs/.env.setup
project-nginx:
image: nginx:stable
container_name: project-nginx
volumes:
- ./workspace/project/:/var/www/project/
- ./.configs/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "80:80"
links:
- project-php
project-php:
build: .
container_name: project-php
volumes:
- ./workspace/project/:/var/www/project/
- ./.configs/php/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini
links:
- project-db