docs: update environment variable naming from NODE_ENV to BUN_ENV
This commit is contained in:
65
.github/workflows/docker-build-push.yml
vendored
Normal file
65
.github/workflows/docker-build-push.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
name: Docker Build and Push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*' # Triggers on version tags like v1.0.0
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Required for version detection
|
||||||
|
|
||||||
|
- name: Get version from tag
|
||||||
|
id: version
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const tag = process.env.GITHUB_REF?.replace('refs/tags/v', '');
|
||||||
|
return tag || 'latest';
|
||||||
|
|
||||||
|
- name: Set up semantic versioning
|
||||||
|
id: semver
|
||||||
|
uses: mathieudutour/github-tag-action@v6
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
default_bump: patch
|
||||||
|
tag_prefix: 'v'
|
||||||
|
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ steps.version.outputs.result }}
|
||||||
|
type=raw,value=${{ steps.semver.outputs.new_tag }}
|
||||||
|
type=raw,value=latest
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
@@ -32,7 +32,7 @@ Before you begin, ensure you have:
|
|||||||
```env
|
```env
|
||||||
# Server Configuration
|
# Server Configuration
|
||||||
PORT=3000
|
PORT=3000
|
||||||
NODE_ENV=development
|
BUN_ENV=development
|
||||||
|
|
||||||
# Home Assistant Configuration
|
# Home Assistant Configuration
|
||||||
HASS_HOST=http://your-hass-instance:8123
|
HASS_HOST=http://your-hass-instance:8123
|
||||||
@@ -47,7 +47,7 @@ Before you begin, ensure you have:
|
|||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
- `PORT`: The port number for the MCP server (default: 3000)
|
- `PORT`: The port number for the MCP server (default: 3000)
|
||||||
- `NODE_ENV`: The environment mode (development, production, test)
|
- `BUN_ENV`: The environment mode (development, production, test)
|
||||||
- `HASS_HOST`: Your Home Assistant instance URL
|
- `HASS_HOST`: Your Home Assistant instance URL
|
||||||
- `HASS_TOKEN`: Your Home Assistant Long-Lived Access Token
|
- `HASS_TOKEN`: Your Home Assistant Long-Lived Access Token
|
||||||
- `JWT_SECRET`: Secret key for JWT token generation
|
- `JWT_SECRET`: Secret key for JWT token generation
|
||||||
|
|||||||
Reference in New Issue
Block a user