Sign inSign up

smokserwis/wordpress-pgsql

By smokserwis

•Updated over 3 years ago

A Docker image of a PostgreSQL-enabled WordPress

Image
0

507

smokserwis/wordpress-pgsql repository overview

⁠wordpress-pgsql

docker hub plugin source at github

A Wordpress Docker image with PostgreSQL support

⁠Usage

You need to provide following environment variables:

  • DB_NAME - name of the PostgreSQL database to use
  • DB_USER - login for PostgreSQL
  • DB_PASSWORD - password for PostgreSQL
  • DB_HOST - host where PostgreSQL is located

The container uses port 80 to handle WordPress requests over HTTP.

As usual, after you configure your reverse proxy visit https://domainname.example.com/wp-admin/install.php⁠ to install WordPress.

To enable uploads to work, you should mount /var/www/html/wp-content/uploads as a volume.

⁠Reverse proxy terminating SSL

If you are using a reverse proxy to terminate SSL, make sure it passes the header of X-Forwarded-Proto as https, otherwise WordPress will generate invalid links, and also be sure to set the environment variable of FORCE_SSL to 1.

⁠Plugins surviving restarts

If you intend on installing custom plugins, you might want to declare /var/www/html/wp-content/plugins as a volume. Remember to place the necessary files there though.

⁠Special thanks

Special thanks to Shoaib Hassan⁠ without whom this script would have taken much longer to write!

Also thanks to Kevin Locke⁠ for writing the code that enables WordPress to use PostgreSQL.

Also, many thanks to the wonderful community of WordPress⁠!

Tag summary

Content type

Image

Digest

sha256:8b48f45b5…

Size

284.4 MB

Last updated

over 3 years ago

docker pull smokserwis/wordpress-pgsql