mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-27 04:06:04 +10:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 27f379aeb2 | |||
|
|
853253f9ab | ||
| 7edfa0405c | |||
| 05097e7ea3 | |||
| 0900ddb2d5 | |||
| d261957ff3 | |||
| 393450b9d8 | |||
| 2239172cd5 | |||
| c20fb5ed24 | |||
|
|
61cf3b98a4 | ||
|
|
d2b7382a94 | ||
| 5ead876fb5 | |||
|
|
40aa2a436e | ||
|
|
3e38e242a1 | ||
|
|
aee1aa9c6f | ||
| d310600649 | |||
| d61f834168 | |||
|
|
1080aa88c8 | ||
|
|
db86fc3e92 | ||
| ee18de5916 | |||
| 07ca4c8f70 | |||
| 28b1a76ae8 | |||
| bbca283b5a | |||
| 3ae523341a | |||
| bcf9301626 | |||
| 88bcefdc5a | |||
| ece2679625 | |||
| db6f384d1d | |||
| be2cc3dfc2 |
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
25
.github/workflows/docker-push.yml
vendored
25
.github/workflows/docker-push.yml
vendored
@@ -3,6 +3,11 @@ name: Docker
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
image_tag:
|
||||
description: 'Enter the image tag'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -11,21 +16,35 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Log into Docker registry
|
||||
- name: Log into Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Log into GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up environment variables
|
||||
id: env
|
||||
run: |
|
||||
echo "IMAGE_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
||||
echo "IMAGE_TAG=${{ github.event.release.tag_name || inputs.image_tag }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push Docker image to Docker Hub
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: docker.io/litruv/api-websocket-bridge:${{ env.IMAGE_TAG }}
|
||||
|
||||
- name: Build and push Docker image to GitHub Container Registry
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ghcr.io/${{ github.actor }}/api-websocket-bridge:${{ env.IMAGE_TAG }}
|
||||
|
||||
10
README.md
10
README.md
@@ -16,7 +16,7 @@ To run the API WebSocket Bridge in a Docker container, follow these steps:
|
||||
2. Navigate to the project directory.
|
||||
|
||||
```bash
|
||||
cd websocket-driver
|
||||
cd api-websocket-bridge
|
||||
```
|
||||
|
||||
3. Configure the API WebSocket Bridge by editing the `config.json` file located in the `config` directory. Refer to the 'Configuration' section below for details on how to customize the configuration based on your requirements and the API you are working with.
|
||||
@@ -24,17 +24,17 @@ cd websocket-driver
|
||||
4. Build the Docker image.
|
||||
|
||||
```bash
|
||||
docker build -t websocket-driver .
|
||||
docker build -t api-websocket-bridge .
|
||||
```
|
||||
|
||||
5. Run the Docker container, exposing the necessary port and providing the required volume mounts.
|
||||
|
||||
```bash
|
||||
docker run -d -p 8080:8080 --name websocket-container \
|
||||
docker run -d -p 8080:8080 --name api-websocket-bridge \
|
||||
-v /path/to/cert/fullchain.pem:/app/cert/fullchain.pem \
|
||||
-v /path/to/cert/privkey.pem:/app/cert/privkey.pem \
|
||||
-v /path/to/config:/app/config \
|
||||
websocket-driver
|
||||
api-websocket-bridge
|
||||
```
|
||||
|
||||
Make sure to replace `/path/to/cert` with the path to your SSL certificate and key files, and `/path/to/config` with the path to your `config.json` file.
|
||||
@@ -42,7 +42,7 @@ Make sure to replace `/path/to/cert` with the path to your SSL certificate and k
|
||||
|
||||
## Configuration
|
||||
|
||||
The WebSocketDriver application relies on a configuration file (`config.json`) to specify various settings. Below is an example configuration that corresponds to the example response from Salty Bet's API:
|
||||
The API WebSocket Bridge application relies on a configuration file (`config.json`) to specify various settings. Below is an example configuration that corresponds to the example response from Salty Bet's API:
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
24
package-lock.json
generated
24
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "api-websocket-bridge",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "api-websocket-bridge",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.5",
|
||||
"license": "Apache 2.0",
|
||||
"dependencies": {
|
||||
"axios": "^1.4.0",
|
||||
@@ -20,11 +20,11 @@
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
|
||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
||||
"version": "1.7.4",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
|
||||
"integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
@@ -57,9 +57,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -113,9 +113,9 @@
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user