Skip to content

Instantly share code, notes, and snippets.

View sssurii's full-sized avatar
😊
:10:10

Surinder Singh sssurii

😊
:10:10
View GitHub Profile
@sssurii
sssurii / gcp-manual-deploy-php-git-actions-steps.md
Created November 4, 2019 07:26 — forked from jdecode/gcp-manual-deploy-php-git-actions-steps.md
Steps to run PHP code with manual code deploy (i.e. via git clone/pull) at Google Cloud Platform [GCP/GCE] : Basics++

High level actions

  1. Create a VM (Virtual Machine) - with minimal hardware specs : probably a version with 1 vCPU and less than (or equal to) 1 GB RAM
  2. Use Ubuntu as the OS (you can choose any other OS, but you have to make sure that the respective commands for any follow up actions are known and you are well versed with those).
  3. Enable/configure SSH to access the system
  4. Clone git repo (Github/Bitbucket/Gitlab etc) - and install any dependencies on the VM
  5. Configure any additional tools/services that the code is using (DB/PDO/JSON etc)
  6. Map the IP/generic-url to a domain name (if you don't have a domain, then make sure you sign-up for that - free or paid - choice is yours) - DNS management

Good to have (If not here, then where? If not now, then when?):

{{ $var }} - Echo content
{{ $var or 'default' }} - Echo content with a default value
{{{ $var }}} - Echo escaped content
{{-- Comment --}} - A Blade comment
@extends('layout') - Extends a template with a layout
@if(condition) - Starts an if block
@else - Starts an else block
@elseif(condition) - Start a elseif block
@endif - Ends a if block