Compare commits

..

9 Commits

Author SHA1 Message Date
Dave Horton
4119d766d5 Dockerfile change 2021-12-21 20:51:02 -05:00
Dave Horton
936a9da887 dockerfile change 2021-12-21 09:52:27 -05:00
Dave Horton
77098f273d bump version 2021-12-21 09:43:27 -05:00
Dave Horton
e27b5a39a6 Dockerfile 2021-12-17 13:49:59 -05:00
Dave Horton
66872494f9 added docker publish 2021-12-13 14:27:23 -05:00
Dave Horton
4557b32804 added docker publish 2021-12-13 14:18:34 -05:00
Dave Horton
e55fe77171 version bump 2021-12-13 09:54:53 -05:00
Dave Horton
0fd87a732f need to provide status ENABLED when creating a subspace teleport 2021-12-08 20:11:15 -05:00
Dave Horton
f6d358d3df Subspace (#12)
* changes for subspace (via nimbleape)

* changes from more testing

* working api to subspace

* more subspace fixes

* further subspace fixes
2021-12-07 07:40:50 -05:00
8 changed files with 110 additions and 5 deletions

View File

@@ -0,0 +1,51 @@
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

51
.github/workflows/docker-publish.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
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:16
FROM node:17
WORKDIR /opt/app/
COPY package.json ./
RUN npm install

View File

@@ -1,4 +1,4 @@
FROM node:16
FROM node:17
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: `sip:${dest}`
destination: dest
});
logger.info({destination, teleport}, 'SubspaceTeleport - create teleport');
await Account.update(req.params.sid, {

View File

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

View File

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

View File

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