mirror of
https://github.com/manualdousuario/marreta.git
synced 2025-09-01 18:20:22 +00:00
36 lines
860 B
Docker
36 lines
860 B
Docker
FROM php:8.0-fpm
|
|
|
|
# Instala dependências e extensões do PHP
|
|
RUN apt-get update && apt-get install -y \
|
|
nginx \
|
|
nano \
|
|
procps \
|
|
zip \
|
|
git \
|
|
htop \
|
|
libzip-dev \
|
|
&& docker-php-ext-install zip
|
|
|
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
|
|
|
COPY default.conf /etc/nginx/sites-available/default
|
|
|
|
RUN mkdir -p /app
|
|
COPY app/ /app/
|
|
|
|
WORKDIR /app
|
|
RUN composer install --no-interaction --optimize-autoloader
|
|
|
|
# Copia e configura permissões do script de inicialização
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
RUN mkdir -p /app/cache /app/logs
|
|
|
|
# Configura permissões base para o diretório /app
|
|
RUN chown -R www-data:www-data /app \
|
|
&& chmod -R 755 /app
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|