Closed dkivi closed 5 years ago
The wordpress-operator
is doing this already. If you define in site's spec
bootstrap: # wordpress install config
env:
- name: WORDPRESS_BOOTSTRAP_USER
valueFrom:
secretKeyRef:
name: mysite
key: USER
- name: WORDPRESS_BOOTSTRAP_PASSWORD
valueFrom:
secretKeyRef:
name: mysite
key: PASSWORD
the wordpress-operator will spawn an init container that runs that wp-cli command, you mentioned.
It would be great if Wordpress was completely pre-installed, so that the installation page wouldn't be displayed at all.
My idea would be to initialize the database via wp-cli, for example with a command like this:
wp-cli core install --url=$WP_HOME --title=$WP_TITLE --admin_user=$WP_ADMIN_USER --admin_password=$WP_ADMIN_PASS --admin_email=$WP_ADMIN_EMAIL