Code Monkey home page Code Monkey logo

jenkins-docker-nginx's Introduction

jenkins-docker-nginx

license

Supported tags and respective Dockerfile links

Quick reference

Usage

Variable replacement

Out-of-the-box, Nginx doesn't support using environment variables inside most configuration blocks. We will be using envsubst to replace variables within the default.conf.template and index.html.template files.

This is done by using CMD /wrapper.sh inside of the Dockerfile. The wrapper.sh is a simple shell script that calls envsubst to replace $DOMAIN and $SUB_DOMAIN with the values of environment variables that you define.

Modify configuration files

You can simply modify configuration files via reusing the docker image, for example:

FROM target/jenkins-docker-nginx

COPY <my default template> /etc/nginx/conf.d/default.conf.template

Docker Swarm

Assumptions

  • Existing Docker Swarm cluster with version >= 1.13
  • Overlay network named jenkins
  • Using Docker secrets for ssl certificates

Deployment

The following steps need to be done on a Docker Swarm manager

  1. Create a Docker swarm overlay network with:

    docker network create --driver overlay --subnet <Subnet in CIDR format> jenkins
  2. Create Docker secrets

    docker secret create cert.crt <path to certificate>
    docker secret create cert.key <path to key>
  3. Modify the docker-compose.yml file to have company specific settings

  4. Create a docker stack

    docker stack deploy -c docker-compose.yml service

jenkins-docker-nginx's People

Contributors

slushpupie avatar jordansussman avatar pa3ng avatar sjqnn avatar

Watchers

James Cloos 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.