Coder Social home page Coder Social logo

docker-shareabouts's Introduction

LetsDeploy!

What is this?

LetsDeploy is a configuration script to deploy your app in a production environment using Letsencrypt for SSL and an Nginx webserver. LetsDeploy runs on Docker and Docker-Compose.

To use LetsDeploy, we are assuming that you have containerized your application.

Feel free to fork this project, dial in your config (explained below), and get your production environment up asap!

NOTE: LetsDeploy is designed to get your demo(s) into production with minimal cost. It deploys your apps to a single-server environment, so it is not yet designed for scalability.

Simple deployment: LetsDeploy this as-is:

Install Docker dependencies:

This should get you started: https://docs.docker.com/engine/installation/

Or if you're feel courageous, you can try this:

wget -qO- https://get.docker.com/ | sh

then install docker-compose

(if you did the Mac install, then you can skip the docker-compose step because it's already included.)

using pip or whatever works for you:

sudo apt-get install python-pip
# or try this:
sudo easy_install pip

then:

pip install docker-compose

Dial in your config:

Create your .env file from the template, ie cp .env.template .env. Follow the instructions in that file to get your app running that way you want. Passwords, customized settings, etc, should all be in your .env file.

Let.Us.Deploy!

When ready, just run ./letsdeploy.sh! Do you want to re-deploy? Have you made any changes, and you want to update your site? Just run ./letsdeploy.sh again!

The letsdeploy command is idempotent, and the docker-compose wrapper script will tear down and re-orchestrate your containers. This makes it easy to manage the state of your deployment.

Customizing the deployment:

We are using Docker-Compose version 2 (latest version), so just edit the example.yml file as needed, and connect it with your .env files by including variable names using standard shell syntax (ie $MY_VARIABLE or ${MY_VARIABLE})

How do I test this locally?

The automated ssl cert generation/renewal makes this a bit complicated, but we are working to simplify this. For now, to test it locally, just comment out the letsencrypt, nginx, and letsencrypt-nginx-cron containers in nginx.yml, and copy this to the end of example.yml:

  nginx:
    image: nginx
    volumes:
      - ./nginx-local.conf:/etc/nginx/nginx.conf
    links:
      - app
    ports:
      - 80:80
    restart: always

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.