Optimal Deployment of PHP- / NodeJS-Websites with Azure

%3CLINGO-SUB%20id%3D%22lingo-sub-2556280%22%20slang%3D%22de-DE%22%3EOptimal%20Deployment%20of%20PHP%2F%20NodeJS%20Websites%20with%20Azure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2556280%22%20slang%3D%22de-DE%22%3E%3CP%3EHi%20everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20PHP-Developer%20and%20pretty%20new%20to%20Azure%20Devops.%20At%20the%20moment%20I%20am%20struggeling%20a%20bit%20by%20creating%20an%20optimal%20CI-process%20with%20Azure%20Devops.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIm%20working%20locally%20with%20Docker(DDEV)%20and%20want%20to%20deploy%20my%20php-application%20including%20my%20NodeJS-Frontend%20to%20my%20customers%20webspaces.%20I%20have%20got%20SSH-Access%20to%20these%20Servers%2C%20can%20get%20PHP%2C%20Node%2C%20Composer%20etc.%20but%20I%20am%20just%20thinking%20that%20building%20my%20whole%20website%20on%20a%20production-Server%20during%20my%20deployment%20seems%20not%20to%20be%20a%20good%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anybody%20have%20experience%20with%20this%20kind%20of%20deployment%20with%20Azure%20Devops%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20current%20workflow%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBuild%20Pipeline%3A%3C%2FP%3E%3CP%3E1.%20Build%20ubuntu%20Image%3C%2FP%3E%3CP%3E2.%20Install%20php%20in%20image%3C%2FP%3E%3CP%3E3.%20Composer%20install%20in%20image%3C%2FP%3E%3CP%3E4.%20Node%20install%3C%2FP%3E%3CP%3E5.%20Npm%20install%3C%2FP%3E%3CP%3E6.%20Start%20frontend%20build%3C%2FP%3E%3CP%3E7.%20Copy%20files%20to%20build%20artefact%20(frontend%20builts%20including%20composer.lock%20for%20php%20without%20vendor%20folder)%3C%2FP%3E%3CP%3E8.%20Publish%20build%20artifact%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERelease%20Pipeline%3A%3C%2FP%3E%3CP%3E1.%20Download%20artefact%3C%2FP%3E%3CP%3E2.%20Copy%20files%20from%20artefact%20to%20target%20host%20via%20SSH%3C%2FP%3E%3CP%3E3.%20Composer%20install%20on%20target%20system%3C%2FP%3E%3CP%3E4.%20Deleting%20Caches%3C%2FP%3E%3CP%3E5.%20Finalize%20Job%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20feels%20not%20really%20optimal%20and%20my%20tests%20are%20still%20not%20included.%20But%20any%20help%20is%20more%20than%20welcome.%20Im%20really%20interested%20in%20finding%20a%20better%20way.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20somebody%20either%20knows%20good%20documentation%2C%20screencast%20or%20direct%20community%20access%2C%20let%20me%20know.%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreetz%20from%20Cologne%20-%20United%20Kingdom%3C%2FP%3E%3CP%3ESven%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2556280%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3EAzure%20DevOps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeployment%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ersync%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Essh%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hi everyone,

 

I'm PHP-Developer and pretty new to Azure Devops. At the moment I am struggeling a bit by creating an optimal CI-process with Azure Devops.

 

Im working locally with Docker(DDEV) and want to deploy my php-application including my NodeJS-Frontend to my customers webspaces. I have got SSH-Access to these Servers, can get PHP, Node, Composer etc. but I am just thinking that building my whole website on a production-Server during my deployment seems not to be a good solution.

 

Does anybody have experience with this kind of deployment with Azure Devops?

 

My current workflow is:

 

Build Pipeline:

1. Build ubuntu Image

2. Install php in image

3. Composer install in image

4. Node install

5. Npm install

6. Start frontend build

7. Copy files to build artefact (frontend builts including composer.lock for php without vendor folder)

8. Publish build artifact

 

Release Pipeline:

1. Download artefact

2. Copy files from artefact to target host via SSH 

3. Composer install on target system

4. Deleting Caches

5. Finalize Job

 

It feels not really optimal and my tests are still not included. But any help is more than welcome. Im really interested in finding a better way.

 

If somebody either knows good documentation, screencast or direct community access, let me know. :)

 

Greetz from Cologne - Germany

Sven

 

0 Replies