diff --git a/php8/docker/Dockerfile b/php8/docker/Dockerfile index 5c69ac6..5d7f9f7 100755 --- a/php8/docker/Dockerfile +++ b/php8/docker/Dockerfile @@ -25,11 +25,11 @@ RUN echo "memory_limit = 256M" > /usr/local/etc/php/conf.d/custom.ini \ # Set working directory WORKDIR /var/www/html -# Copy application code -COPY --chown=www-data:www-data . . - # Expose port 9000 for PHP-FPM EXPOSE 9000 -# Start PHP-FPM +COPY docker/entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT [ "/entrypoint.sh" ] + CMD ["php-fpm"] \ No newline at end of file diff --git a/php8/docker/docker-compose.yml b/php8/docker/docker-compose.yml index 46d4fe7..361211b 100755 --- a/php8/docker/docker-compose.yml +++ b/php8/docker/docker-compose.yml @@ -18,9 +18,9 @@ services: image: php82-nginx-img container_name: php82-nginx ports: - - "8081:80" + - "50080:80" volumes: - - ..:/var/www/html:ro + - ..:/var/www/html depends_on: - php networks: diff --git a/php8/docker/entrypoint.sh b/php8/docker/entrypoint.sh new file mode 100644 index 0000000..169a28e --- /dev/null +++ b/php8/docker/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +chown -R www-data:www-data /var/www/html + +exec "$@" \ No newline at end of file