geerlingguy / jeffgeerling-com

Drupal Codebase for JeffGeerling.com
https://www.jeffgeerling.com
GNU General Public License v2.0
38 stars 2 forks source link

Get Docker container production-ready #140

Closed geerlingguy closed 2 years ago

geerlingguy commented 2 years ago

The Dockerfile included in this repository currently sets up a container image only really suitable for local development purposes. I'd like to make sure the Docker image generated by default is production ready and deployable.

Selfishly, it's the first step in getting JeffGeerling.com completely Kubernetes runnable, and ideally in a hosted repository on Docker Hub.

geerlingguy commented 2 years ago

First step done, and I have an image pushed manually: https://hub.docker.com/r/geerlingguy/jeffgeerling-com

geerlingguy commented 2 years ago

Next steps:

arm64 only for now.

geerlingguy commented 2 years ago

Installation seems to be working somewhat... things are a little shaky but hey, if it works it works:

Screen Shot 2022-02-08 at 4 20 23 PM

I get the following errors currently:

The Drupal installer requires that the ./sites/default/default.settings.php file must not be deleted or modified from the original download.

The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process. The [webhosting issues](https://www.drupal.org/server-permissions) documentation section offers help on this and other topics.

Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution.

But that's related to my K8s template layout in the turing-pi-2-cluster project. So... maybe installation with a config file mounted via Kubernetes isn't the best way for my own image :/

I was trying to hack the K8s template so it could easily work with both the library Docker image (https://hub.docker.com/_/drupal/) and my website image, but I might have to fully commit to my image instead.

geerlingguy commented 2 years ago

Works. Done. Yay.