You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works fine and I am able to access the site. I would like to automate this step along with a few other wp commands. My target is to keep these commands in a shell script and then run it from a Dockerfile via CMD.
Currently, I am just executing wp core install as a part of the Dockerfile to test but executing it as a part of Docker messes up some configuration which I am unable to figure out:
...
RUN mkdir -p /var/www/.wp-cli/cache && chown www-data:www-data /var/www/.wp-cli/cache
# sleep is required so that MySQL is ready to accept requestsCMD sleep 10 && wp core install --url=myapp.local --title="MyApp" --admin_user=admin --admin_password=secret [email protected] && tail -f /dev/null
I start getting 502 while trying to access the website. On the terminal, I can see this:
I am trying to automate setting up my wordpress site using this docker-compose configuration.
This is the manual step which I do atm:
and then inside the docker container:
This works fine and I am able to access the site. I would like to automate this step along with a few other
wp
commands. My target is to keep these commands in a shell script and then run it from a Dockerfile viaCMD
.Currently, I am just executing
wp core install
as a part of the Dockerfile to test but executing it as a part of Docker messes up some configuration which I am unable to figure out:I start getting 502 while trying to access the website. On the terminal, I can see this:
Any pointers on how to execute these
wp
commands as a part of docker compose?The text was updated successfully, but these errors were encountered: