Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This library is **only for managing development environments** and is not intend
- `ngrok` support for easy SSL testing on localhost
- Take a snapshot of your environment and re-use for significantly reduced start-up time
- Configurable WordPress version
- Configurable PHP version (`7.2`, `7.3`, `7.4`, or `8.0`)
- Configurable PHP version (`7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, or `8.3`)
- Configurable PHP environment variables
- Import a database on environment start-up (with URL replacement)
- Import and replace the database of a **running** environment (with URL replacement)
Expand Down Expand Up @@ -267,7 +267,7 @@ Reference for the `wp-instances.json` config file.
- *Optional*
- *Type: `String`*
- *Default: `7.3`*
- Description: This is the PHP version Apache will use. Possible values are `7.2`, `7.3`, and `7.4`.
- Description: This is the PHP version Apache will use. Possible values are `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, and `8.3`.
<hr>

### -- wordpressVersion
Expand Down
56 changes: 56 additions & 0 deletions docker/Dockerfile.php8.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
FROM wordpress:6.7-php8.2-apache

RUN apt update && apt install -y \
# for wp cli
default-mysql-client

# Strict error/notice reporting
RUN echo "error_reporting=E_ALL" >> /usr/local/etc/php/php.ini

# Install xdebug for PHP live debugging in vscode
RUN yes | pecl install xdebug
RUN touch /var/www/html/xdebug_log
RUN echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.client_port=9900" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.log=/var/www/html/xdebug_log" >> /usr/local/etc/php/conf.d/xdebug.ini \
# until an option is added to suppress the `[Step Debug] Could not connect to debugging client.` error message,
# we set the log_level to 0
&& echo "xdebug.log_level=1" >> /usr/local/etc/php/conf.d/xdebug.ini

RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
RUN chmod +x wp-cli.phar
RUN mv wp-cli.phar /usr/local/bin/wp

# RUN apt update && apt install less
# COPY docker/.env .env
# RUN cp /usr/src/wordpress/wp-config-docker.php /usr/src/wordpress/wp-config.php
# RUN chown www-data:www-data /usr/src/wordpress/wp-config.php
# COPY --chown=www-data:www-data docker/wp-config-docker.php /usr/src/wordpress/wp-config.php
# ENV WORDPRESS_DB_HOST=localhost:5001
# ENV WORDPRESS_DB_USER=admin
# ENV WORDPRESS_DB_PASSWORD=admin
# ENV WORDPRESS_DB_NAME=wordpress
# COPY docker/test_connection.php test_connection.php
# RUN php test_connection.php
# RUN wp --allow-root core install --debug --path=/usr/src/wordpress --title=test --admin_user=admin --admin_password=admin --admin_email=admin@example.com

# RUN ls -la /usr/src/wordpress && exit 1
# RUN sed -i '/^exec "\$\@"/d' /usr/local/bin/docker-entrypoint.sh
# RUN sed -i '1a . `pwd`/.env' /usr/local/bin/docker-entrypoint.sh
# RUN docker-entrypoint.sh apache2-foreground
# RUN echo "#!/usr/bin/env bash" > /usr/local/bin/docker-entrypoint.sh
# RUN echo 'wp --allow-root plugin install usc-e-shop' >> /usr/local/bin/docker-entrypoint.sh
# RUN echo 'exec "$@"' >> /usr/local/bin/docker-entrypoint.sh
# RUN php -d memory_limit=512M "$(which wp)" --allow-root core download

# RUN apt update && apt install -y jq
# RUN sed -i '/^exec "\$\@"/d' /usr/local/bin/docker-entrypoint.sh
# RUN echo '${AVC_SCRIPTS_DIR}/download_pts.sh' >> /usr/local/bin/docker-entrypoint.sh
# RUN echo 'exec "$@"' >> /usr/local/bin/docker-entrypoint.sh
#
# COPY src/scripts /avc-wpdocker-meta/scripts

# CMD ["/run.sh"]
2 changes: 1 addition & 1 deletion examples/wp-instances.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"instanceName": "my-local-wordpress",
"containerPort": 8060,
"phpVersion": "7.3",
"phpVersion": "8.3",
"wordpressVersion": "latest",
"locale": "en_US",
"image": "my/wordpress/container/image.tar",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export const sshConfigsFilepath = `${serverConfigsDirpath}/${sshConfigsFilename}
export const ftpConfigsFilename = 'ftp.json';
export const ftpConfigsFilepath = `${serverConfigsDirpath}/${ftpConfigsFilename}`;
export const instanceConfFilename = 'wp-instances.json';
export const validPhpVersions = ['7.2', '7.3', '7.4', '8.0', '8.1', '8.3'];
export const validPhpVersions = ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'];