first commit

This commit is contained in:
Meynin
2024-06-11 09:26:12 +07:00
commit c1cae68044
4151 changed files with 778192 additions and 0 deletions

64
Dockerfile Normal file
View File

@@ -0,0 +1,64 @@
FROM php:8.2-fpm-alpine
# FROM alpine:latest
ENV ACCEPT_EULA=Y
WORKDIR /app
# Essentials
RUN echo "Asia/Jakarta" > /etc/timezone
# Install nginx
RUN apk add --no-cache nginx supervisor
# Install prerequisites required for tools and extensions installed later on.
RUN apk add --update bash gnupg less libpng-dev libzip-dev su-exec unzip
# Install prerequisites for the sqlsrv and pdo_sqlsrv PHP extensions.
RUN curl -O https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.2.1-1_amd64.apk \
&& curl -O https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/mssql-tools18_18.3.1.1-1_amd64.apk \
&& curl -O https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.2.1-1_amd64.sig \
&& curl -O https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/mssql-tools18_18.3.1.1-1_amd64.sig \
&& curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import - \
&& gpg --verify msodbcsql18_18.3.2.1-1_amd64.sig msodbcsql18_18.3.2.1-1_amd64.apk \
&& gpg --verify mssql-tools18_18.3.1.1-1_amd64.sig mssql-tools18_18.3.1.1-1_amd64.apk \
&& apk add --allow-untrusted msodbcsql18_18.3.2.1-1_amd64.apk mssql-tools18_18.3.1.1-1_amd64.apk \
&& rm *.apk *.sig
# Retrieve the script used to install PHP extensions from the source container.
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions
# Install required PHP extensions and all their prerequisites available via apt.
RUN chmod uga+x /usr/bin/install-php-extensions \
&& sync \
&& install-php-extensions bcmath ds exif gd intl opcache pcntl pdo_sqlsrv redis sqlsrv zip
# Install PHP Extensions
RUN set -ex && apk --no-cache add icu-dev postgresql-dev
RUN docker-php-ext-install opcache pdo mysqli pdo_mysql pgsql pdo_pgsql\
&& docker-php-ext-enable pdo_mysql pdo_pgsql
RUN docker-php-ext-configure intl && docker-php-ext-install intl
# Copy php-fpm configs
COPY ./_docker/php-fpm/www.conf /usr/local/etc/php-fpm.d/www.conf
COPY ./_docker/php-fpm/php.ini /usr/local/etc/php/conf.d
COPY ./_docker/php-fpm/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
# Copy nginx-configs
COPY ./_docker/nginx/app.conf /etc/nginx/conf.d/default.conf
COPY ./_docker/nginx/nginx.conf /etc/nginx/nginx.conf
# Copy supervisord config
COPY ./_docker/supervisord/supervisord.conf /etc/supervisord.conf
# COPY --chown=www-data:www-data ./src/ .
# RUN mkdir /mnt/media
# RUN chown -R www-data:www-data /mnt/media
# RUN mkdir /mnt/media/ris
# RUN chown -R www-data:www-data /mnt/media/ris
# COPY --chown=www-data:www-data ./media/ .
EXPOSE 80 443
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]