Files
streamline-emr/docker/Dockerfile.streamline-emr.amd64
T
alec.turner 9cbefc841f Simplify application management and align with other docker applications
The notion of application "instances" is dropped in favor of a simpler,
single-instance approach. Default values are provided for all configuration
variables so allow the app to run without additional manual configuration.

A health check and auto-heal script are added to automatically restart the
application in case it becomes unavailable during operation.
2024-03-25 09:34:34 -07:00

52 lines
1.4 KiB
Docker

# FROM streamlinehealth/streamline:signalytic
# COPY my.cnf /etc/mysql/my.cnf
# COPY mysql-init.sh /var/www/html/.docker/mysql/mysql-init.sh
FROM php:8.2-fpm-alpine
# Install necessary packages and cleanup
RUN set -ex; \
apk update && \
apk add --no-cache curl gnupg mysql mysql-client pwgen && \
docker-php-ext-install pdo pdo_mysql && \
rm -rf /var/cache/apk/*
# Install Composer
RUN curl -sS https://getcomposer.org/installer | \
php -- --install-dir=/usr/bin/ --filename=composer
# Set the working directory and copy the application code
COPY streamline-src /var/www/html
COPY my.cnf /etc/mysql/my.cnf
WORKDIR /var/www/html
# Create the 'streamline' user and adjust permissions
RUN addgroup -g 1000 streamline && adduser -G streamline -g streamline -s /bin/sh -D streamline && \
composer install && \
chmod -R 777 /var/www/html/storage/ && \
chown -R streamline:streamline /var/www/html && \
mkdir -p /docker-entrypoint-initdb.d/
# Initialize MySQL
COPY streamline_initial.sql /docker-entrypoint-initdb.d/
COPY mysql-init.sh /var/www/html/.docker/mysql/mysql-init.sh
RUN mkdir /scripts && \
mkdir /scripts/pre-exec.d && \
mkdir /scripts/pre-init.d && \
chmod -R 755 /scripts
VOLUME ["/var/lib/mysql"]
# Set the startup script as executable
RUN chmod +x /var/www/html/start_up.sh
# Define the entry point and expose port 80, 3306
ENTRYPOINT ["/bin/sh", "/var/www/html/start_up.sh"]
EXPOSE 80 3306