Enviar arquivos para "/"

This commit is contained in:
2026-05-26 12:26:20 -03:00
commit 4078a4f1c4
2 changed files with 29 additions and 0 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM php:8.1-apache
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
unzip \
tar \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install mysqli pdo pdo_mysql gd zip \
&& a2enmod rewrite headers \
&& rm -rf /var/lib/apt/lists/*
# Copia os arquivos do projeto
COPY . /var/www/html/
# Descompacta app.tar.gz na própria pasta do projeto
RUN if [ -f /var/www/html/app.tar.gz ]; then \
tar -xzf /var/www/html/app.tar.gz -C /var/www/html && \
rm -f /var/www/html/app.tar.gz; \
fi
# Permissões
RUN chown -R www-data:www-data /var/www/html \
&& find /var/www/html -type d -exec chmod 755 {} \; \
&& find /var/www/html -type f -exec chmod 644 {} \;
EXPOSE 80