sohel shaikh
sohel shaikh

Reputation: 102

How can I deploy my PHP application on Google cloud Platform?

I have previously developed 1 website using php and mysql now I want to deploy it on Google cloud platform. It will be great if someone only point out steps for below points

1.install PHP 7.x

2.creating .YAML files

3.creating mysql databse

4.upload my PHP file

5.FTP setup

Thank you

Upvotes: 0

Views: 2408

Answers (5)

sohel shaikh
sohel shaikh

Reputation: 102

Just follow steps here

it will help you setup LAMP server and upload files to server using FTP (which you can connect using SMTP-keyfile method) and also this document help you to setup mySQL database

Upvotes: 0

dhauptman
dhauptman

Reputation: 1024

Answering your question in the comment;

I've created .YAML file and also created MySQL databse and uploaded all PHP files to bucket as shown in step 4. now how can I create URL that call the Index.php ?

If you deploy your app in App Engine you don't necessarily need to upload all your application files to Cloud Storage because App Engine will put your static files in a managed static files server. You only need to set this in the app.yaml file.

I suggest you to take a look at the this sample application's files , so you can have a good idea on how to set all configuration files in order to deploy your app to App Engine standard environment and connect to Cloud SQL.

App Engine will create a default URL for you app under appspot.com domain, check for details here.

For more information on how you can connect to Cloud SQL from GAE standard take a look here.

Upvotes: 0

Maksim
Maksim

Reputation: 2957

Try to use Google App Engine - this is the easiest way to deploy app withount install LAMP and FTP. Withount MySQL its free! See the quickstart: https://cloud.google.com/appengine/docs/standard/php7/quickstart

Upvotes: 0

Noohone
Noohone

Reputation: 724

  1. You can start setting up you environment like the documentation describes.

  2. For creating ".YAML" files there is also documentation by google.

  3. To create your MySQL database you should check this documentation about creating Cloud SQL.

  4. To upload PHP file you can use follow the documentation and learn more about Cloud Storage and how to upload objects.

  5. About ftp setup, can you specify why you trying to achieve using it? If you want to transfer files you can you see again the documentation of 4.

Upvotes: 1

jdp
jdp

Reputation: 3516

You can find a large set of example applications for deploying to App Engine here, or on cloud.google.com.

Upvotes: 0

Related Questions