Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Docker run , Docker Compose

Options
  • 17-10-2017 4:32pm
    #1
    Registered Users Posts: 1,298 ✭✭✭


    Hey all,

    Hoping someone in here knows docker.


    I managed to set up a mongo image and if I want to develop on my local machine then i'm running just that image and the data is going in through the exposed port and storing in the DB so thats fine. My problem is that once I build my app with docker-compose with mongodb and my web app using mongo as an image the data is different?

    Can anyone give a brief sentence about why there is a difference in databases even though they're named the same?

    Thanks


Comments

  • Registered Users Posts: 403 ✭✭counterpointaud


    Do you use the same docker-compose command to run in development and for the distribution build? If not, what are the two commands?


  • Registered Users Posts: 1,298 ✭✭✭off.the.walls


    I managed to figure it out, the one that i'm running locally is a separate container to the one that I'm running as part of the docker compose command.


  • Registered Users Posts: 2,030 ✭✭✭colm_c


    IMO, Docker containers themselves should be stateless unless it's for some demo purpose.

    Then use config to connect to a stateful data store as required.


Advertisement