Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/wordpress] Roots / Bedrock Integration #67123

Open
piotr-dajlido opened this issue May 17, 2024 · 5 comments
Open

[bitnami/wordpress] Roots / Bedrock Integration #67123

piotr-dajlido opened this issue May 17, 2024 · 5 comments
Assignees
Labels
feature-request stale 15 days without activity triage Triage is needed wordpress

Comments

@piotr-dajlido
Copy link

Name and Version

bitnami/wordpress:latest

What is the problem this feature will solve?

Hi!

It is extremely hard to go over every script in Bitnami's library and edit hardcoded WordPress values, only to end up with a failing build. Extending the image via the /docker-entrypoint-init.d volume is impossible due to the rootless nature of the image. The Bedrock framework only changes the folder structure of WordPress, yet I have been modifying scripts for two weeks now with no success.

Steps to install bedrock:

  1. install composer - need root
  2. composer create-project roots/bedrock bedrock
  3. composer install - should be rootless
  4. edit every entry that uses "wordpress" file structure to navigate to "bedrock" stucture
  5. create apache conf

Besides.. how do you run this script to provide $app variable.
image

What is the feature you are proposing to solve the problem?

I PR as soon as I would get this working.

What alternatives have you considered?

not really

@github-actions github-actions bot added the triage Triage is needed label May 17, 2024
@javsalgar javsalgar changed the title Roots / Bedrock Integration [bitnami/wordpress] Roots / Bedrock Integration May 20, 2024
@javsalgar
Copy link
Contributor

Hi,

Thank you so much for the feature request. The bitnami scripts tries to create environment variables in wordpress-env.sh for most of the locations. However, if using bedrock fully deviates the structure of the default wordpress installation I'm afraid that's something we cannot afford to officially support. About the $app value, this is a parameter of the ensure... function, which is used in the postunpack.sh script if I'm not mistaken. You could try exploring that script to perform the proper adaptations to bedrock.

@piotr-dajlido
Copy link
Author

Hi,

Thank you so much for the feature request. The bitnami scripts tries to create environment variables in wordpress-env.sh for most of the locations. However, if using bedrock fully deviates the structure of the default wordpress installation I'm afraid that's something we cannot afford to officially support. About the $app value, this is a parameter of the ensure... function, which is used in the postunpack.sh script if I'm not mistaken. You could try exploring that script to perform the proper adaptations to bedrock.

Just for show'n'tell I've created a PR to demonstrate minimal modification to get wordpress + roots/bedrock and roots/sage working in bitnami container. I understand that this thread is going to be closed, but I wanted to leave some information for anyone else looking to build a similar solution.

cbfbe59

image

@javsalgar
Copy link
Contributor

Thank you so much! The community will benefit from this

@piotr-dajlido
Copy link
Author

piotr-dajlido commented May 23, 2024

I have successfully deployed bitnami/wordpress chart with swaped image for wordpress/bedrock and mariadb

  1. create volume bedrock-config
  2. create secret bedrock-config from Values.bedrockConfig ( example below)
  3. mount volume at /opt/bitnami/bedrock/.env
bedrockConfig: |
  DB_NAME='wordpress'
  DB_USER='wordpress'
  DB_PASSWORD='wordpress'

  # Optionally, you can use a data source name (DSN)
  # When using a DSN, you can remove the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST variables
  # DATABASE_URL='mysql://database_user:database_password@database_host:database_port/database_name'

  # Optional database variables
  DB_HOST=cluster-mariadb:port
  # DB_PREFIX='wp_'
 
  WP_ENV='development'
  WP_HOME='https://frontend.kariera-pwpw.testing.apps.pulab.local'
  WP_SITEURL="${WP_HOME}/wp"

  # Specify optional debug.log path
  # WP_DEBUG_LOG='/path/to/debug.log'

  # Generate your keys here: https://roots.io/salts.html
  AUTH_KEY=',G#laVgxv0(J^|M(14ocAwn=Q(a}#52ol/[O(|t9-h%Aj(H.l1Dz4Sbks.6H#xGO'
  SECURE_AUTH_KEY='-;]t<{+Vu%CH08Dv2iR!<uol8AD7E9-}:x:%u>9eRJ6JgFX2=$0[*a%m:}2PUMsm'
  LOGGED_IN_KEY='d:Mn<YRvbMZ*6jAQ$bP(YC,DOQrEyOY)Q/dc4g`^c>aIQWmAD]Gtzr37D6wl8!em'
  NONCE_KEY='f>?kUMX%QBJZNj5PVWug!CN=@_[-LBL>RV.W*OR.Cc;i/kfr4L:]x_T,gJBZ<)@e'
  AUTH_SALT='*S(]#Sk*JH^9t{E3%Mva`ru$tA=fz3<5<<Vm%c*N-qU5rxBS5x<l3$`GViS@LJ_.'
  SECURE_AUTH_SALT='^gg-8S%.r8O<crlp2SctD^VQE]6?}Q0C,[/T(IC=`4WYV0*R^DW7JQF[ym9eN?Bz'
  LOGGED_IN_SALT='<3/$e&U:U$t*|hx$e#)P_;LZg``l#sbI^f9l6e[bPgpQI9WGbLS0Rs{G/Hws8LS8'
  NONCE_SALT='/vx`fJ#d|h#a8$c>LLI%4jv,>q_+xZ2j?#<YcUw{{PA/X!%F7k:-2R.Pf=rk>zOZ'

Copy link

github-actions bot commented Jun 8, 2024

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request stale 15 days without activity triage Triage is needed wordpress
Projects
None yet
Development

No branches or pull requests

2 participants