Coder Social home page Coder Social logo

big-vi / php-ci-cd Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 495 KB

Deploying SiverStripe CMS in AWS ECS(Fargate) using AWS CDK by setting up CI/CD Pipeline with RDS MySQL & Redis ElastiCache.

License: MIT License

Shell 10.68% PHP 4.20% Dockerfile 5.02% JavaScript 14.10% SCSS 0.07% Handlebars 5.73% Scheme 10.01% Python 47.61% Batchfile 0.80% Makefile 1.78%
ci-cd docker ecs-fargate elasticache-redis php silverstripe cloudformation aws-cdk-python aws-rds-mysql

php-ci-cd's Introduction

Docker

docker build -t <image-name> .

<!-- If you're building this image from Mac with M1 chip -->
docker buildx build --platform=linux/amd64 -t <image-name> . -f Dockerfile

docker run --rm -it <image-name> bash

docker-compose up
docker exec -it <container-name> /bin/sh

<!-- To get what command the docker image ran -->
docker inspect --format='{{.Config.Cmd}}' <image-tag>

AWS ECR

aws ecr get-login-password --region ap-southeast-2 | docker login --username AWS --password-stdin <ACCOUNT_ID>.dkr.ecr.ap-southeast-2.amazonaws.com

docker tag <IMAGE_ID> <ACCOUNT_ID>.dkr.ecr.ap-southeast-2.amazonaws.com/php

docker push <ACCOUNT_ID>.dkr.ecr.ap-southeast-2.amazonaws.com/php

CDK

cdk init app --language python
pip install -r requirements.txt
python3 -m venv .venv
source .venv/bin/activate
cdk synth
cdk bootstrap
cdk deploy
<!-- If you have more than one stack -->
ckd deploy --all
<!-- To debug if your CloudFormation fails -->
cdk deploy --all --no-rollback
<-- To only deploy the function not CloudFormation template -->
cdk deploy --hotswap 
cdk watch

php-ci-cd's People

Contributors

big-vi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.