DEV Community

Discussion on: Need suggestion on how to create a CI/CD pipeline for my dockerized app

Collapse
 
manan30 profile image
Manan Joshi

You can use DroneCI, BitBucket Pipelines or GitHub Actions. If you would like to learn more about them or require any kind of help in setting up your pipeline, feel free to reach out to me.

Collapse
 
kmehran1106 profile image
Mehran Kader

Hi! I am currently using Bitbucket Pipelines. What I'm doing right now is this:

image: python:3.6

pipelines:
  branches:
    stage:
      - step:
          name: 'Stage Deployment'
          deployment: 'stage'
          caches:
            - pip
          script:
            - echo "Deploying to Stage - Start"
            - pip install fabric python-decouple
            - fab -c pipelines-fabfile connect stage
            - echo "Deploying to Stage - End"
    master:
      - step:
          name: 'Live Deployment'
          deployment: 'live'
          caches:
            - pip
          script:
            - echo "Deploying to Live - Start"
            - pip install fabric python-decouple
            - fab -c pipelines-fabfile connect live
            - echo "Deploying to Live - End"

Basically I'm using pipelines-fabfile to ssh into my server (like regular fabric) and pull my code from git and restart my docker containers using compose. Although this works but I'm pretty sure this is not the appropriate approach. Can you shed some light on this? It'd be really helpful. Thanks!