Search code examples
laravellaravel-vapor

Laravel Vapoor on aws codepipeline


Laravel vapor is completely developed on aws platform but not used aws code pipeline to deploy codes. Has anyone tried aws code pipeline to deploy vapor codes?

I can deploy ubuntu server and install required PHP extensions and run vapor deploy staging command in aws codedeploy. Wondering is there any better way to deploy laravel vapor.


Solution

  • Finally, I made the below changes in the buildspec.yml file and used the ubuntu instance.

    install:
        commands:
           - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 &
           - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
           #- command
          #- echo Logging in to Amazon ECR
      pre_build:
        commands:
           - docker run --name myvapor -d -e VAPOR_API_TOKEN=MY_VAPOR_API_TOKEN  --volume $(pwd):/~   --workdir /~ teamnovu/laravel-vapor
           - docker exec myvapor  vapor deploy staging