Skip to content

Commit

Permalink
Merge pull request #16 from haipham22/chore/php-config
Browse files Browse the repository at this point in the history
chore: add php config
  • Loading branch information
haipham22 authored Sep 11, 2023
2 parents 7aaf07b + 8d60b4c commit f05627b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,25 @@ RUN install-php-extensions composer
RUN composer install --optimize-autoloader --no-interaction --no-progress
```

## Add php config to Dockerfile

```Dockerfile
FROM haipham22/nginx-php-fpm:8.2-fpm-alpine

USER root

# Use the default production configuration for PHP-FPM ($PHP_INI_DIR variable already set by the default image)
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
RUN echo "memory_limit = 128M;" >> "$PHP_INI_DIR/php.ini"


# Switch to use a non-root user from here on
USER www-data

# Add application
COPY --chown=www-data . /app/
```

## Configuration

In [config/](config/) you'll find the default configuration files for Nginx, PHP and PHP-FPM.
Expand Down

0 comments on commit f05627b

Please sign in to comment.