Docker updates

This commit is contained in:
Joey Kimsey
2024-08-14 17:41:15 -04:00
parent 156f19ee97
commit b6767ae846
11 changed files with 191 additions and 139 deletions

View File

@ -0,0 +1,29 @@
FROM php:8-fpm as php-fpm
# Env
ENV COMPOSER_ALLOW_SUPERUSER=1
# Install Packages
RUN apt-get update -y
RUN apt-get install -y nginx libmariadb-dev git libzip-dev zip unzip supervisor
RUN docker-php-ext-install mysqli pdo pdo_mysql zip
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
#Install TTP
WORKDIR /var/www
RUN rm -rf html/
RUN composer create-project thetempusproject/thetempusproject html
RUN chmod -R 777 html/
RUN chown -R www-data:www-data html/
# Copy Nginx configuration file
RUN cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old
COPY ./docker/ttp-nginx/nginx.conf /etc/nginx/nginx.conf
# Copy Supervisor configuration file
COPY ./docker/ttp-nginx/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Start Supervisor, which will start both Nginx and PHP-FPM
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]