Git Product home page Git Product logo

docker-sample-apps's Introduction

Typing SVG

docker-sample-apps's People

Contributors

jakubhajek avatar

Stargazers

 avatar  avatar

Watchers

 avatar

docker-sample-apps's Issues

Could you help me figure out what I am doing wrong?

I am trying do configure my docker compose to use traefik as reverse proxy to my nodejs app.
It is running locally at host nodejsdeploy.betorobson which I have add a entry at hosts file to point out my local machine. So far my nodejs works by its own on port 3000.

So, it is working when I load on browser URL http://nodejsdeploy.betorobson:3000

My aim is to use traefik as reverse proxy on port 80.

Here is my docker compose which I am trying a few setups, you can see some comments lines which represent some of those frustrated setup that I have tried before.

Applying this compose setup, I can see the traefik dashboard running on port 8080, but when I try access the nodejs thought the port 80, it shows 404 page not found

version: "3"

services:
  app:
    labels:
      # - "traefik.backend=app"
      - "traefik.port=3000"
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.frontend.rule=Host:nodejsdeploy.betorobson"
      # - "traefik.frontend.rule=Host:nodejsdeploy.betorobson"
      # - "traefik.docker.network=web"
      - "traefik.port=80"
    build: .
    ports:
      - "3000:3000"
    # networks:
    #   - internal
    #   - web
    command: yarn start

  reverse-proxy:
    image: traefik:latest
    # command: --api --docker.exposedbydefault=false
    # command: --api --api.insecure=true --docker.exposedbydefault=false --providers.docker

    # command: --api.insecure=true --providers.docker

    command:
     - --api.insecure=true
     - --providers.docker

    # command:
    #   - --api
    #   - --api.insecure=true
    #   - --docker
    #   # - --docker.swarmmode
    #   - --docker.watch
    #   # - --entrypoints=Name:http Address::80 Redirect.EntryPoint:https
    #   # - --entrypoints=Name:https Address::443 TLS
    #   # - --defaultentrypoints=http,https
    #   # - --acme
    #   # - [email protected]
    #   # - --acme.storage=/certificates/acme.json
    #   # - --acme.entryPoint=https
    #   # - --acme.httpChallenge.entryPoint=http
    #   # - --acme.onhostrule=true
    #   # - --acme.acmelogging=true
    #   # - --logLevel=INFO
    #   # - --accessLog
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

  # whoami:
  #   image: containous/whoami
  #   labels:
  #     - "traefik.http.routers.whoami.rule=Host(`nodejsdeploy.betorobson`)"

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.