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

help with cloudrun and wordpress #90

Closed
dsgolfside opened this issue Dec 15, 2019 · 2 comments
Closed

help with cloudrun and wordpress #90

dsgolfside opened this issue Dec 15, 2019 · 2 comments

Comments

@dsgolfside
Copy link

dsgolfside commented Dec 15, 2019

can anyone give a non programmer like me instructions on how to use Berglas to startup wordpress

i'm looking at these directions:

First, we set the credentials to access to the database through environment variables (we use PHP function getenv):

define( 'DB_NAME', getenv('DB_NAME')  );
/** MySQL database username */
define( 'DB_USER', getenv('DB_USER') );
/** MySQL database password */
define( 'DB_PASSWORD', getenv('DB_PASSWORD') );
/** MySQL hostname */
define( 'DB_HOST', getenv('DB_HOST') );

It would be correct to pass this sensitive data through secrets but they are not (currently) natively supported by Cloud Run: for the sake of simplicity we will just pass them as plain-text but for production deploy it is absolutely recommended to use one of the possible workarounds available here https://www.sethvargo.com/secrets-in-serverless/.

@sethvargo
Copy link
Member

Hi @dsgolfside

If you are using Cloud Run, take a look at the examples/cloudrun folder in this repo. Even though there's no PHP example, the python or node example will get you on the right track. You need to update your container's entrypoint to start with berglas exec

Old Dockerfile:

ENTRYPOINT ['php', 'my-app']

New Dockerfile:

ENTRYPOINT ['berglas', 'exec', '--', 'php', 'my-app']

Does that help?

@stale
Copy link

stale bot commented Dec 29, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Dec 29, 2019
@stale stale bot closed this as completed Jan 12, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants