# Deploy nimsforestecommerce

## Release process

Push a `v*` tag to trigger the GitHub Actions release workflow:

```bash
git tag v0.X.Y && git push origin v0.X.Y
```

This builds cross-platform binaries, creates a GitHub release, and pushes a Docker image to `registry.nimsforest.com/nimsforestecommerce`.

## Server

land-shared-one: `178.104.70.180`
- Config: `/opt/nimsforestecommerce/config.yaml`
- Container: `nimsforestecommerce` (host networking, port 8094)

## Update container

```bash
ssh root@178.104.70.180 'docker pull registry.nimsforest.com/nimsforestecommerce:<version> && \
  docker stop nimsforestecommerce && docker rm nimsforestecommerce && \
  docker run -d --name nimsforestecommerce --network host --restart unless-stopped \
    -v /opt/nimsforestecommerce/config.yaml:/etc/nimsforestecommerce/config.yaml \
    registry.nimsforest.com/nimsforestecommerce:<version>'
```

## Config

```yaml
listen: ":8094"
base_url: "https://nimsforest.com"
nats_url: "nats://127.0.0.1:4222"
pantheon_url: "http://127.0.0.1:8093"
pantheon_admin_key: "<key>"
landregistry_url: "http://127.0.0.1:8096"
landregistry_token: "<token>"
realm_id: "r_349832f91720"
stripe_api_url: "http://127.0.0.1:8097"
stripe_api_token: "<nimsforeststripe API token>"
stripe_price_id: "price_..."
plans:
  - id: "monthly"
    name: "Nimsforest Monthly"
    description: "Full Nimsforest platform — agents billed on usage"
    price_id: "price_..."
    amount: "€99/month"
  - id: "monthly-consultancy"
    name: "Nimsforest Monthly + Consultancy"
    description: "Full platform + full day consultancy per month — agents billed on usage"
    price_id: "price_..."
    amount: "€999/month"
    limit: 10
```

## Rollback

```bash
ssh root@178.104.70.180 'docker stop nimsforestecommerce && docker rm nimsforestecommerce && \
  docker run -d --name nimsforestecommerce --network host --restart unless-stopped \
    -v /opt/nimsforestecommerce/config.yaml:/etc/nimsforestecommerce/config.yaml \
    registry.nimsforest.com/nimsforestecommerce:<previous-version>'
```
