title: nextjs with docker. I connect to the website only with port 3000
body: <p>In nextjs with doker I go to the website like this &quot;site.com:3000&quot;.but of course I want to go to my site just by this link &quot;site.com&quot;.I don't understand why 3000 is sucked at the end.
  It looks like your post is mostly code; please add some more details.
  It looks like your post is mostly code; please add some more details.It looks like your post is mostly code; please add some more details.</p>
  <p>DOKER-COMPOSE</p>
  <pre><code>    networks:
    docknet:
      external: true
  
  services:
    nextjs:
      logging:
        options:
          max-size: 5m
      build:
        context: ./
        dockerfile: ./Dockerfile
        args:
          UID: ${UID}
          GID: ${GID}
          MYUSERNAME: ${MYUSERNAME}
          MYUSERGROUP: ${MYUSERGROUP}
      restart: unless-stopped
      ports:
        - 3000:3000
      volumes:
        - ./:/home/${MYUSERNAME}/client
        - /home/${MYUSERNAME}/client/.next
        - /home/${MYUSERNAME}/client/node_modules
      tty: true
      networks:
        - docknet
      labels:
        - &quot;traefik.enable=true&quot;
        - &quot;traefik.http.services.nextjs.loadbalancer.server.port=3000&quot;
        - &quot;traefik.http.routers.postroyka.rule=Host(`MYwebsite.ru`)&quot;
        - &quot;traefik.http.routers.postroyka.entrypoints=websecure&quot;
        - &quot;traefik.http.routers.postroyka.tls.certresolver=myresolver&quot;
        - &quot;traefik.http.middlewares.ratelimited.ratelimit.average=30&quot;
        - &quot;traefik.http.middlewares.ratelimited.ratelimit.burst=100&quot;
        - &quot;traefik.http.middlewares.ratelimited.ratelimit.period=1&quot;
        - &quot;traefik.http.routers.postroyka.middlewares=ratelimited@docker&quot;
        - &quot;traefik.http.routers.postroyka.middlewares=https_redirect&quot;
        - &quot;traefik.http.middlewares.https_redirect.redirectscheme.scheme=https&quot;
        - &quot;traefik.http.middlewares.https_redirect.redirectscheme.permanent=true&quot;
  </code></pre>
  <p>DOCKERFILE</p>
  <pre><code>    FROM node:alpine
  
  ARG UID
  ARG GID
  ARG MYUSERNAME
  ARG MYUSERGROUP
  ENV MYUSERNAME ${MYUSERNAME}
  ENV MYUSERGROUP ${MYUSERGROUP}
  
  RUN apk add runuser
  RUN addgroup -g $GID -S $MYUSERGROUP &amp;&amp; \
  adduser -S -u $UID $MYUSERNAME -G $MYUSERGROUP
  
  WORKDIR /home/$MYUSERNAME/client
  COPY . .
  RUN npm install
  
  CMD chown -R $MYUSERNAME:$MYUSERGROUP /home/$MYUSERNAME/client &amp;&amp; \
  exec runuser -u $MYUSERNAME npm run dev
  </code></pre>