Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
NPM/docker networking
Post Body

Hi,

I have a docker compose file that is starting up a nodejs app and NPM

version: "3.8"
services:
  node-app:
    build:
      context: .
    env_file:
      - .env
    command: npm run start
    restart: unless-stopped

  nginx:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "81:81"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

I have pointed my subdomain to my vps's IP and abc.mydomain.com does point to the "Congratulations page" of NPM.
I dont believe `node-app` needs the port exposed according to https://youtu.be/P3imFC7GSr0?t=441 (the video says that the port doesnt need to be exposed and that the docker network will have access to the `node-app`. My node app is running on port 8000

Currently:

- `123.456.789.123` points to the "Congratulations page"

- `123.456.789.123:81` points NPM login page

- `abc.mydomain.com` points to the "Congratulations page"

- `abc.mydomain.com:81` doesnt do anything

How do i make it so that

- `abc.mydomain.com` points to the node-app

- `def.mydomain.com` points to NPM login page.

- `123.456.789.123` points nothing

- `123.456.789.123:81` points to nothing

​

When I used the internal IP (for example 172.22.0.2) of the node-app as a proxy host, it did work, however, everytime I redeploy my container, it breaks because the internal IP changes

Author
Account Strength
50%
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
169
Link Karma
66
Comment Karma
103
Profile updated: 4 days ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 months ago