Code Monkey home page Code Monkey logo

jenkins-pipeline-docker-app's Introduction

Installation

Install vagrant (https://www.vagrantup.com/)

vagrant plugin install vagrant-vbguest
vagrant plugin install hostmanager

Launch Vagrant Box

cd vagrant
vagrant box update
vagrant up 
vagrant ssh

Update application vendor libraries (with dockerized composer)

cd /var/www/jendocapp/
docker run --rm -v $(pwd):/app composer/composer:php5 install

See more: https://hub.docker.com/r/composer/composer/

Start up the docker containers

cd /code/docker
./run_application.sh

Configure doctrine database entities

cd /code/docker
docker-compose -p application exec app vendor/bin/doctrine orm:schema-tool:update --dump-sql
docker-compose -p application exec app vendor/bin/doctrine orm:schema-tool:update --force

Import database

cd /code/docker
docker-compose -p application exec mysql bash
mysql -u root -pdev language < somedata.sql

Running tests in isolated container namespace

cd /code/docker
./run_tests_dockerized.sh

Running phing tasks in isolated container namespace

cd /code/docker
docker-compose -p SOME_NAMESPACE run --rm cli vendor/bin/phing -f build/build.xml TASK_NAME

Starting up local jenkins instance

cd /code/docker
./run_jenkins

Running bash inside jenkins to fiddle around

cd /code/docker
docker-compose -p jenkins exec jenkins bash

Application directory (inside vagrant VM)

  • /var/www/jendocapp

Access the website from host

Show docker containers logs

  • cd /docker
  • docker-compose logs -f

Accessing the containers

  • cd /docker
  • docker exec -it mysql bash
  • docker exec -it app bash
  • etc..

Removing old images

docker run -ti -v /var/run/docker.sock:/var/run/docker.sock yelp/docker-custodian dcgc --max-container-age 1day --max-image-age 1day

jenkins-pipeline-docker-app's People

Contributors

chieftainy2k avatar

Watchers

 avatar  avatar

Forkers

spg7484

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.