A Docker image of a PostgreSQL-enabled WordPress
507
A Wordpress Docker image with PostgreSQL support
You need to provide following environment variables:
DB_NAME - name of the PostgreSQL database to useDB_USER - login for PostgreSQLDB_PASSWORD - password for PostgreSQLDB_HOST - host where PostgreSQL is locatedThe 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.
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.
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 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!
Content type
Image
Digest
sha256:8b48f45b5…
Size
284.4 MB
Last updated
over 3 years ago
docker pull smokserwis/wordpress-pgsql