๐ My blog is at https://liftcodeplay.com
bcnzer / cloudrun-cloudsql-wordpress Goto Github PK
View Code? Open in Web Editor NEWWordPress instance running out of GCP Cloud Run, backed with a MySQL database in Cloud SQL
License: MIT License
WordPress instance running out of GCP Cloud Run, backed with a MySQL database in Cloud SQL
License: MIT License
๐ My blog is at https://liftcodeplay.com
I tried to deploy this code, but this error was occured when I run setup.sh
.
Deploying container to Cloud Run service [wordpress] in project [xxxxx-xxxxx-xxxxx] region [us-central1]
โ ถ Deploying new service... Invalid ENTRYPOINT. [name: "gcr.io/xxxxx-xxxxx-xxxxx/wordpress@sha256:b71d07578155a74007b8ff1c6fe7e62c71080380897fe04c086221c598fdd686"
error: "Command \"cloud-run-entrypoint.sh\": invalid mode \"-rw-r--r--\" for /usr/local/bin/cloud-run-entrypoint.sh"
].. Routing traffic...
X Creating Revision... Invalid ENTRYPOINT. [name: "gcr.io/xxxxx-xxxxx-xxxxx/wordpress@sha256:b71d07578155a74007b8ff1c6fe7e62c71080380897fe04c086221c598fdd686"
X Deploying new service... Invalid ENTRYPOINT. [name: "gcr.io/xxxxx-xxxxx-xxxxx/wordpress@sha256:b71d07578155a74007b8ff1c6fe7e62c71080380897fe04c086221c598fdd686"
error: "Command \"cloud-run-entrypoint.sh\": invalid mode \"-rw-r--r--\" for /usr/local/bin/cloud-run-entrypoint.sh"
].
Deployment failed
ERROR: (gcloud.run.deploy) Invalid ENTRYPOINT. [name: "gcr.io/xxxxx-xxxxx-xxxxx/wordpress@sha256:b71d07578155a74007b8ff1c6fe7e62c71080380897fe04c086221c598fdd686"
error: "Command \"cloud-run-entrypoint.sh\": invalid mode \"-rw-r--r--\" for /usr/local/bin/cloud-run-entrypoint.sh"
].
So I added RUN chmod +x /usr/local/bin/cloud-run-entrypoint.sh
in Dockerfile
bellow COPY wordpress/cloud-run-entrypoint.sh /usr/local/bin/
, it works.
Dockerfile
# See https://hub.docker.com/_/wordpress/ for the latest
FROM wordpress:5.3.2-php7.4-apache
EXPOSE 8080
# Use the PORT environment variable in Apache configuration files.
RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
# wordpress conf
COPY wordpress/wp-config.php /var/www/html/wp-config.php
# Copy WordPress THEMES
COPY themes /usr/src/wordpress/wp-content/themes/
# Copy WordPress PLUGINS
COPY plugins /usr/src/wordpress/wp-content/plugins/
# download and install cloud_sql_proxy
RUN apt-get update && apt-get install curl
RUN curl -o /usr/local/bin/cloud_sql_proxy https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 && chmod +x /usr/local/bin/cloud_sql_proxy
# custom entrypoint
COPY wordpress/cloud-run-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/cloud-run-entrypoint.sh
ENTRYPOINT ["cloud-run-entrypoint.sh","docker-entrypoint.sh"]
CMD ["apache2-foreground"]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.