Coder Social home page Coder Social logo

Comments (3)

MikeMichel avatar MikeMichel commented on May 28, 2024

argh, just finished the second blog post about the "old" hackathon-starter. however, megaboilerplate looks awesome. The dev docker-compose.yml i created still works with the express+mongodb+jade combi.

version: '2'
services:

  web:
    image: node:6.1
    volumes:
      - ./:/usr/src/app
    working_dir: /usr/src/app
    command: sh -c 'npm install; npm install -g nodemon ; nodemon -e js,jade app.js'
    ports:
      - "80:3000"
    depends_on:
      - mongo
    networks:
      - all
    environment:
      MONGODB: "mongodb://mongo:27017/hackathon"

  mongo:
    image: mongo:3
    command: mongod --smallfiles
    networks:
      - all

networks:
  all:

same for the Dockerfile:

FROM node:6.1.0

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY . /usr/src/app/
RUN npm install

CMD [ "node", "app.js" ]

What do you have in mind? Generating only buildfiles regarding the choosed frameworks or docker-compose.yml files too?

btw. in hackathon-starter you switched from MONGODB to MONGODB_URI

cheers,

mike

from megaboilerplate.

sahat avatar sahat commented on May 28, 2024

Hey Mike, having not used Docker or Docker Compose I have a little difficulty understanding of where these tools fit in the workflow and the difference between Docker and Docker Compose. From the docs:

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application’s services.

But that still doesn't tell me much.

I think I understand the purpose behind Docker - it's to specify all system dependencies like Node.js, MongoDB, PostgreSQL, configure a database, install build tools, and finally run the app. So, with a single command you can start an app without having to install all those prerequisites on your machine. That's Dockerfile. Something like that could be a checkbox option under Platform or Framework selection.

Now where does Docker Compose fit in this picture?

from megaboilerplate.

obrientimothya avatar obrientimothya commented on May 28, 2024

Hey @sahat

Docker Compose allows you to specify multiple containers per project (eg. one for database, another for web) Each can have different Docker images fit for purpose, which may connect to different code bases within your project tree, etc.

I'm thinking Docker would be a nice way to support several hosting platforms (DigitalOcean has one-click Docker instances, for example) Would be easy enough to incorporate deployment scripts for each.
Thoughts?

Keep up the great work, I'm excited!

from megaboilerplate.

Related Issues (20)

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.