Giter VIP home page Giter VIP logo

docker-nginx-deploy's Introduction

Web application deployment with docker and nginx

Web application deployment using docker, docker-compose and manage multiple environment like production, stating etc.

Docker compose file modification ex- docker image, volume mapping, configuration file

  • Open docker-compose.yml file and update the service and images you will be using for each service as per instruction in the compose file.

Database configuration ex- username, db, password

  • Make a copy of .env from .env.sample
  • Modify .env file and set corresponding values related to database and application specific secrect values.

Run database service service defined in docker-compose.yml file

$ docker-compose up -d db
$ docker-compose exec db bash
$ mysql -uroot -p

Note:

  • Create application specific database
  • Create application specific user and grant previlidges to the database

Run appication service defined in the docker-compose.yml file

$ docker-compose up -d app
$ docker-compose exec app bash
$ bundle exec rake db:migrate
$ bundle exec rake db:seed
$ exit

Nginx configuration file modification

  • Modify nginx.conf file which is located under nginx/nginx.conf file. You can find the instructions in the config file where you might need to change as per your application setup.
  • For ssl configuration enable nginx/nginx.ssl.conf file in the docker-compose file under web service and do the necessary changes like above.

Finally run nginx web server defined in docker-compose.yml file

$ docker-compose up -d web

docker-nginx-deploy's People

Contributors

masudcsesust04 avatar

Stargazers

 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.