BookStack/docker-compose.yml
Abijeet a0c605faae Docker: Fix PHP tests
This creates another mysql_testing database during db service setup

Replace server with env tags in phpunit.xml in order to force
override certain parameters when tests are run. See:
https://github.com/sebastianbergmann/phpunit/issues/2353 for more
information.

Rename primary developer Docker database from bookstack-test to
bookstack-dev. bookstack-test is used as the mysql_testing database
2021-01-31 18:54:24 +05:30

51 lines
1.1 KiB
YAML

# This is a Docker Compose configuration
# intended for development purposes only
version: '3'
volumes:
db: {}
services:
db:
image: mysql:8
environment:
MYSQL_DATABASE: bookstack-dev
MYSQL_USER: bookstack-test
MYSQL_PASSWORD: bookstack-test
MYSQL_RANDOM_ROOT_PASSWORD: 'true'
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./dev/docker/init.db:/docker-entrypoint-initdb.d
- db:/var/lib/mysql
app:
build:
context: .
dockerfile: ./dev/docker/Dockerfile
environment:
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: bookstack-dev
DB_USERNAME: bookstack-test
DB_PASSWORD: bookstack-test
MAIL_DRIVER: smtp
MAIL_HOST: mailhog
MAIL_PORT: 1025
ports:
- ${DEV_PORT:-8080}:80
volumes:
- ./:/app
entrypoint: /app/dev/docker/entrypoint.app.sh
node:
image: node:alpine
working_dir: /app
user: node
volumes:
- ./:/app
entrypoint: /app/dev/docker/entrypoint.node.sh
mailhog:
image: mailhog/mailhog
ports:
- ${DEV_MAIL_PORT:-8025}:8025