Compare commits

..

5 Commits

Author SHA1 Message Date
Dave Horton
252116cf84 further subspace fixes 2021-12-06 18:08:16 -05:00
Dave Horton
2c3bdc9be0 more subspace fixes 2021-12-06 18:08:16 -05:00
Dave Horton
7a25874703 working api to subspace 2021-12-06 18:08:16 -05:00
Dave Horton
d2c2ed7d08 changes from more testing 2021-12-06 18:08:16 -05:00
Dave Horton
ab39f01008 changes for subspace (via nimbleape) 2021-12-06 18:08:16 -05:00
8 changed files with 5 additions and 110 deletions

View File

@@ -1,51 +0,0 @@
name: Docker
on:
push:
# Publish `main` as Docker `latest` image.
branches:
- main
# Publish `v1.2.3` tags as releases.
tags:
- v*
env:
IMAGE_NAME: db-create
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Build image
run: docker build . --file Dockerfile.db-create --tag $IMAGE_NAME
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION

View File

@@ -1,51 +0,0 @@
name: Docker
on:
push:
# Publish `main` as Docker `latest` image.
branches:
- main
# Publish `v1.2.3` tags as releases.
tags:
- v*
env:
IMAGE_NAME: api-server
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION

View File

@@ -1,4 +1,4 @@
FROM node:17
FROM node:16
WORKDIR /opt/app/
COPY package.json ./
RUN npm install

View File

@@ -1,4 +1,4 @@
FROM node:17
FROM node:16
WORKDIR /opt/app/
COPY package.json ./
RUN npm install

View File

@@ -385,7 +385,7 @@ router.post('/:sid/SubspaceTeleport', async(req, res) => {
const teleport = await enableSubspace({
subspace_client_id,
subspace_client_secret,
destination: dest
destination: `sip:${dest}`
});
logger.info({destination, teleport}, 'SubspaceTeleport - create teleport');
await Account.update(req.params.sid, {

View File

@@ -247,9 +247,8 @@ const enableSubspace = async(opts) => {
const teleport = await postTeleport('/v1/sipteleport',
{
name: 'Jambonz',
destination,
status: 'ENABLED'
name: 'Jambonz'
},
{
'Content-Type': 'application/json',

View File

@@ -1,6 +1,6 @@
{
"name": "jambonz-api-server",
"version": "v0.7.1",
"version": "v0.6.7-rc8",
"description": "",
"main": "app.js",
"scripts": {

View File

@@ -10,7 +10,6 @@ networks:
services:
mysql:
platform: linux/x86_64
image: mysql:5.7
ports:
- "3360:3306"
@@ -36,7 +35,6 @@ services:
ipv4_address: 172.58.0.3
influxdb:
platform: linux/x86_64
image: influxdb:1.8-alpine
ports:
- "8086:8086"