Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kazol4433/docker_practice

Repository files navigation

A sample project that runs phpBB forum on Apache web server using mySQL as the database server. Also includes phpmyadmin to view the database tables.

Some useful commands:


git clone https://github.com/parigandhi/forum.git

docker-compose build --no-cache
docker-compose up -d
docker-compose down
docker system prune -a
chmod +x portainer.sh
./portainer.sh

Deploying the code to Google Cloud Platform:


1. Create a GCP project.

2. Open the Cloud Console.

3. Clone the code git clone https://github.com/parigandhi/forum.git

4. Go to the folder cd forum

5. Build an image Syntax: gcloud builds submit --tag gcr.io/[project id]/[tag for the image]
gcloud builds submit --tag gcr.io/my-docker-php-mysql/docker-gcp-tag
GCP will ask you whether you want to enable the APIs. Select y to enable API

6. Verify that your image was successfully stored in GCP
Go to Storage > Storage > Browse
You will see two files - appspot.com and cloudbuild
appspot.com contains the container image and cloudbuild contains the source code as a tar file

7. Run the docker image on Google Cloud
Syntax: gcloud run deploy --image gcr.io/[project id]/[tag for the image]
gcloud run deploy --image gcr.io/my-docker-php-mysql/docker-gcp-tag

Google will ask the target platform - Cloud Run (fully managed) - or - Cloud Run for Anthos deployed on Google Cloud-or- Cloud Run for Anthos deployed on VMWare
Select Cloud Run (fully managed)
Select enter to go with default service
Select y to enable API
Select a region to deploy the service
Select y to unauthenticated invocations

8. Once the service is published, Google Console will give you a URL to access the website. Click on it to launch your website.

Good luck

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published