question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker-compose not working with actual config ?

See original GitHub issue

Hi,

doing the tests I was not able to make the services work properly through docker with docker-compose. With actual docker-compose.yaml (my actual config is ubuntu 18.04 and docker 18.09.1) mongodb not working because say me missing /data/db (even if i create dir as suggested) and nginx proxy not forward to app-1 because it’s volume not shared.

Now with the following config seems to work, if it can help someone… :


version: '3'
services:
    app-1:
        container_name: app-1
        image: docker.io/openhab/openhabcloud-app
        working_dir: /opt/openhabcloud
        volumes:
        - app-1:/opt/openhabcloud
        networks:
        - ohcloud-network
        links:
        - mongodb
        - redis
        ports:
        - "3000"
        depends_on:
        - mongodb
        - redis  
        restart: always     
    mongodb:
        container_name: mongodb
        image: bitnami/mongodb:latest
        ports:
        - "27017:27017"
#        command: mongod --smallfiles --bind_ip_all
        networks:
        - ohcloud-network
        volumes:
        - /tmp:/bitnami # change /tmp to data dir what you want
#        - /data/configdb
        restart: always
    redis:
        container_name: redis
        image: bitnami/redis:latest
        networks:
        - ohcloud-network
        ports:
        - "6379"
        environment:
        - REDIS_PASSWORD=123_openHAB
        restart: always
    nginx:
        container_name: nginx
        image: docker.io/openhab/openhabcloud-nginx
        volumes:
        - app-1:/opt/openhabcloud
        networks:
        - ohcloud-network
        ports:
        - "80:8081"
        - "443:8443"
        links:
        - app-1:app-1
volumes:
  app-1:
networks:
  ohcloud-network:
    driver: bridge

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:22 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
alackmanncommented, Oct 13, 2019

@marziman did you have a chance to look at PR #276 ? Any issues or concerns?

1reaction
digitaldancommented, Jan 16, 2020

I have merged #276 , thanks for the contribution and apologies for not reviewing sooner.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker compose prompted error: no configuration file provided
The problem was with docker-compose.yml file. I saved it from Visual Studio Code as a text file though OS determined it like a...
Read more >
docker-compose stop does not work if one service in ... - GitHub
I have one more config in upper dir with other cluster configuration and that one were not running so docker-compose stop not stopping...
Read more >
Share Compose configurations between files and projects
How to use Docker Compose's extends keyword to share configuration between files and projects.
Read more >
Overview of docker compose CLI
You can use the -f flag to specify a path to a Compose file that is not located in the current directory, either...
Read more >
Compose command compatibility with docker-compose
The config command is intended to show the configuration used by Docker Compose to run the actual project. As we know, at some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found