# Node JS Stack

The example below demonstrates a MEAN stack sample `docker-compose.yml` with the pre-defined Sidecar.

<img src="/files/w2rVot5L6u8Wf8FJWXxu" alt="" data-size="line"><img src="/files/LyxaVE9Fo8dJAcoSaW1I" alt="" data-size="line"><img src="/files/S8ZzM6M2XafxmmgvXptS" alt="" data-size="line">

{% code title="docker-compose.yml" %}

```docker
# MEAN stack sample docker-compose file
version: "3"
services:
  ui:
   build:
      context: ./ui
      dockerfile: Dockerfile.dev
   ports:
      - 4200:4200
   container_name: mean-ui
   networks:
      - mean-stack-net
   volumes:
      - ./ui/src:/usr/app/src
      - ./ui/public:/usr/app/public
   depends_on:
      - api
   stdin_open: true
   tty: true

  api:
   build:
    context: ./api
    dockerfile: Dockerfile.dev
   ports:
      - 3080:3080
   container_name: mean-api
   networks:
      - mean-stack-net
   volumes:
      - ./api/src:/usr/app/src
   depends_on:
      - db

  db:
    image: mongo
    ports:
      - 27017:27017
    container_name: mongo-db
    networks:
      - mean-stack-net
    volumes:
      - mongo-data:/data/db
  
  sidecar:
    image: industryapps.azurecr.io/service-discovery-sidecar
    container_name: { my-apps-name-sidecar }
    restart: always
    environment:
      NODE_ENV: production
      DEPLOYMENT_MODE: public
      EUREKA_INSTANCE_IP: { IP }
      EUREKA_INSTANCE_PORT: { PORT }
      EUREKA_INSTANCE_APP: { app-code }
      EUREKA_INSTANCE_HOST_NAME: { my-app-domain }/
      EUREKA_INSTANCE_HOME_PAGE_URL: https://<your_domain>/{APPCODE}
      EUREKA_HOST: servicediscovery.uat.industryapps.net
      EUREKA_PORT: 443
  

networks:
  mean-stack-net:
    driver: bridge

volumes:
  mongo-data:
    driver: local
```

{% endcode %}

Inside the `docker-compose.yml` file, add the necessary information which is tagged with curly braces ' `{  }` '.&#x20;

* **`IP`** -> The IP of the web service which you are running, such as on AWS EC2 Ubuntu, Lightsail instance or Azure Web services as an example.
* **`PORT`** -> The port which the app client-side is served at (e.g. Port 80).
* **`APPCODE`** -> Navigate to Developer dashboard > Applications > {App Name} > App Data, the Application code will be available there.
* **`HOSTNAME`** -> Can be found on the Developer dashboard, the boilerplate is the hostname  of the application: `https://<your_domain>/{APPCODE}`

{% hint style="info" %}
If the application container is pushed onto IndustryApps, the HOSTNAME is the Application ID.
{% endhint %}

[Additional information about Production deployment can be found here.](/connect-to-the-platform/production-deployment.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.industryapps.net/docker-information/node-js-stack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
