> ## Documentation Index
> Fetch the complete documentation index at: https://docs-v2.ard.co/llms.txt
> Use this file to discover all available pages before exploring further.

# MeteoStudio (Istudio)

> Weather studio service for media and reporting

## Overview

MeteoStudio (Istudio) is a weather studio service used for generating media reports and managing distribution lists.

## Repository

The MeteoStudio repository is hosted on GitLab:

**Repository:** [https://git.wthr.ws/meteoweather/meteostudio](https://git.wthr.ws/meteoweather/meteostudio)

Clone the repository:

```bash theme={null}
git clone https://git.wthr.ws/meteoweather/meteostudio
cd meteostudio
```

## Deployment

MeteoStudio is deployed via **Portainer** on Docker Swarm.

### Deployment Location

**Portainer Stack:** [media-meteostudio](https://portainer.devops.arabiaweather.com/#!/2/docker/stacks/media-meteostudio?id=329\&type=1\&regular=true\&orphaned=false\&orphanedRunning=false)

### Service Configuration

The service runs in the `media-meteostudio` stack with the following configuration:

```yaml theme={null}
meteostudio:
  image: registry.docker.devops.arabiaweather.com/meteo-studio:v2025.11.04-0
  #image: registry.docker.devops.arabiaweather.com/meteo-studio:v2025.09-17-0
  #image: registry.docker.devops.arabiaweather.com/meteo-studio:v2025.09-16-0
  #image: registry.docker.devops.arabiaweather.com/meteo-studio:v2025.06-01-0
  command:
    - istudio
  networks:
    - proxy
    - default
  environment:
    - ATHENA_HOST=athenapdf2:8080
    - APP_URL=https://istudio.meteoweather.global
    - AWS_ACCESS_KEY_ID=AKIAUIARR2I4IVDV6QPM 
    - AWS_SECRET_ACCESS_KEY=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 
    - MONGOURL=mongodb://116.203.246.113:27017/meteostudio
    - delme=0
  deploy:
    mode: replicated
    replicas: 1
    resources:
      limits:
        memory: 2048M
    labels:
      - "traefik.port=3000"
      - "traefik.docker.network=proxy"
      - "traefik.frontend.entryPoints=http,https"
      - "traefik.frontend.redirect.entryPoint=http"
      - "traefik.frontend.rule=Host:istudio.meteoweather.global,studio.meteoweather.global"
```

### Deployment Process

To deploy a new version:

1. **Make code changes** in the repository
2. **Commit** your changes:
   ```bash theme={null}
   git add .
   git commit -m "Your commit message"
   ```
3. **Push** to the repository:
   ```bash theme={null}
   git push
   ```
4. **Tag** the release:
   ```bash theme={null}
   git tag v2025.MM.DD-X
   git push --tags
   ```
5. **Update the service** in Portainer:
   * Navigate to the `media-meteostudio` stack
   * Update the `image` field to the new tag (e.g., `registry.docker.devops.arabiaweather.com/meteo-studio:v2025.11.04-0`)
   * Comment out the old image tag
   * Redeploy the stack

## FAQ

### How to add or remove emails from distribution lists?

Distribution lists are managed in the codebase. To add or remove emails:

1. Navigate to `views/marine-report-page.ect` (or the relevant template file)
2. Find the list name you need to modify
3. Add or remove email addresses from the list
4. Commit, push, tag, and deploy as described above

#### Example Tickets

* **Remove email from distribution:** [ARD-3050](https://linear.app/ardlabs/issue/ARD-3050/remove-tofig-safarov-tofigsafarovexternaljocapaz-from-distribution)
* **Add email to distribution:** [ARD-2958](https://linear.app/ardlabs/issue/ARD-2958/add-email-to-ccc-zuluf-locations)

#### Example Commit

See this commit for reference on how to modify distribution lists:
[Example commit](https://git.wthr.ws/meteoweather/meteostudio/-/commit/b17e841fa62d817f3e5f063e1c9dd2fe59b8b917)

### Where is the service deployed?

The service is deployed in the **media-meteostudio** stack on Portainer:

* **Portainer URL:** [https://portainer.devops.arabiaweather.com/#!/2/docker/stacks/media-meteostudio?id=329\&type=1\&regular=true\&orphaned=false\&orphanedRunning=false](https://portainer.devops.arabiaweather.com/#!/2/docker/stacks/media-meteostudio?id=329\&type=1\&regular=true\&orphaned=false\&orphanedRunning=false)
* **Service URL:** [https://istudio.meteoweather.global](https://istudio.meteoweather.global)
