Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Docker run , Docker Compose

  • 17-10-2017 03:32PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 2,011 ✭✭✭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