Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] output error.log inside docker-container #9415

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Dockerfile.test.php8
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
FROM php:8.1

# Install necessary packages
RUN apt-get update && \
apt-get install -y mariadb-client libzip-dev

RUN docker-php-ext-install pdo_mysql && \
docker-php-ext-install zip
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql zip

# Ensure the logs directory exists
RUN mkdir -p /app/logs

# Configure PHP error logging in php.ini
RUN echo "log_errors = On" >> /usr/local/etc/php/conf.d/php-logging.ini
RUN echo "error_log = /app/logs/php_errors.log" >> /usr/local/etc/php/conf.d/php-logging.ini
RUN echo "display_errors = On" >> /usr/local/etc/php/conf.d/php-logging.ini
RUN echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/php-logging.ini

# Install any additional packages or tools as needed
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
- ./:/app
- ./test/test_instrument/NDB_BVL_Instrument_testtest.class.inc:/app/project/instruments/NDB_BVL_Instrument_testtest.class.inc
- ./raisinbread/instruments:/app/project/instruments
- ./logs:/app/logs # Mount logs to the host machine
environment:
- LORIS_DB_CONFIG=/app/test/config.xml
depends_on:
Expand All @@ -39,6 +40,7 @@ services:
dockerfile: Dockerfile.test.php8
volumes:
- ./:/app
- ./logs:/app/logs
working_dir: /app
environment:
- LORIS_DB_CONFIG=test/config.xml
Expand Down
Loading