Skip to content

Commit

Permalink
Add cloud_sql_proxy
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
  • Loading branch information
Daviey committed Aug 8, 2019
1 parent 95563aa commit b610ffe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ RUN /opt/gcloud/bin/gcloud components install -q \
app-engine-php \
cloud-datastore-emulator

CMD dev_appserver.py --php_executable_path=/usr/local/bin/php-cgi --host 0.0.0.0 /opt/site/
RUN wget -q https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy \
&& chmod +x cloud_sql_proxy

COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

./cloud_sql_proxy -instances="$@"=tcp:3306 &
dev_appserver.py --php_executable_path=/usr/local/bin/php-cgi --host 0.0.0.0 /opt/site/

0 comments on commit b610ffe

Please sign in to comment.