Skip to content

Instantly share code, notes, and snippets.

@zetogk
Last active July 17, 2019 17:14
Show Gist options
  • Save zetogk/3e63d248b0347db7850f9d49fd2027dd to your computer and use it in GitHub Desktop.
Save zetogk/3e63d248b0347db7850f9d49fd2027dd to your computer and use it in GitHub Desktop.
Docker image for Wordpress with certs and upload_limit_size
FROM wordpress:5-apache
VOLUME ["/var/www/html/wp-content"]
# PERMISSION: Give permission to read/write in wp-content
RUN chown -R www-data.www-data /var/www/html/wp-content
# CERTS: If you are using certs
## COPY ./your-folder/mycert.crt /etc/apache2/ssl/mycert.crt # Uncomment if you are using SSL certs
## COPY ./your-folder/mycert.key /etc/apache2/ssl/mycert.key # Uncomment if you are using SSL certs
## COPY ./your-folder/mycert.conf /etc/apache2/sites-enabled/mycert.conf # Uncomment if you are using SSL certs
# UPLOAD LIMIT: Allow to upload large files, example: 200MB
## RUN echo "php_value upload_max_filesize 200M" >> /var/www/html/.htaccess && echo "php_value post_max_size 202M" >> /var/www/html/.htaccess
RUN a2enmod rewrite
# RUN a2enmod ssl # Uncomment if you are using SSL certs
RUN service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment