Atualizar Dockerfile
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -1,13 +1,9 @@
|
|||||||
# Imagem base com PHP, Apache e extensões necessárias
|
|
||||||
FROM php:8.1-apache
|
FROM php:8.1-apache
|
||||||
|
|
||||||
# Configura o timezone
|
|
||||||
ENV TZ=America/Sao_Paulo
|
ENV TZ=America/Sao_Paulo
|
||||||
|
|
||||||
# Habilita módulos do Apache necessários
|
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
# Instala dependências do sistema
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
@@ -18,29 +14,19 @@ RUN apt-get update && apt-get install -y \
|
|||||||
git \
|
git \
|
||||||
zip \
|
zip \
|
||||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-install intl zip pdo pdo_mysqli mbstring gd \
|
&& docker-php-ext-install intl zip pdo pdo_mysql mbstring gd \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
# Configura o diretório padrão do Apache
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
# Define o índice padrão do Apache
|
|
||||||
RUN echo "DirectoryIndex login.php index.php" > /etc/apache2/conf-available/directoryindex.conf && \
|
RUN echo "DirectoryIndex login.php index.php" > /etc/apache2/conf-available/directoryindex.conf && \
|
||||||
a2enconf directoryindex
|
a2enconf directoryindex
|
||||||
|
|
||||||
# Copia os arquivos da aplicação empacotada
|
|
||||||
COPY app.zip /var/www/html/
|
COPY app.zip /var/www/html/
|
||||||
RUN unzip -o app.zip && rm app.zip
|
RUN unzip -o app.zip && rm app.zip
|
||||||
|
|
||||||
# Copia e descompacta os arquivos auxiliares
|
|
||||||
#COPY files.zip /data/coolify/sgq/files/
|
|
||||||
#RUN cd /data/coolify/sgq/files && unzip -o files.zip && rm files.zip
|
|
||||||
|
|
||||||
# Ajusta permissões
|
|
||||||
RUN chown -R www-data:www-data /var/www/html
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
# Expõe a porta 80
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Inicializa o Apache em foreground
|
CMD ["apache2-foreground"]
|
||||||
CMD ["apache2-foreground"]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user