From 19bc17b1dd72c52886415fd25534227de02830eb Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 19 May 2023 19:13:48 +0600 Subject: [PATCH] updated dockerfiles this is a mess, i have to come up with something better --- docker/docker-compose.yml.example | 39 +++++++++++++++++++++++++ dockerfile_api => docker/dockerfile_api | 0 dockerfile_web => docker/dockerfile_web | 0 src/front/cobalt.js | 6 +++- 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 docker/docker-compose.yml.example rename dockerfile_api => docker/dockerfile_api (100%) rename dockerfile_web => docker/dockerfile_web (100%) diff --git a/docker/docker-compose.yml.example b/docker/docker-compose.yml.example new file mode 100644 index 0000000..9284e1d --- /dev/null +++ b/docker/docker-compose.yml.example @@ -0,0 +1,39 @@ +version: '3.5' + +services: + cobalt-api: + build: + context: . + dockerfile: ./docker/dockerfile_api + restart: unless-stopped + container_name: cobalt-api + ports: + - 9000:9000/tcp + environment: + - apiPort=9000 + - apiURL='https://co.wuk.sh/' + - cors=1 + cobalt-web: + build: + context: . + dockerfile: ./docker/dockerfile_web + restart: unless-stopped + container_name: cobalt-web + ports: + - 9000:9000/tcp + environment: + - apiPort=9000 + - apiURL='https://co.wuk.sh/' + - cors=1 + cobalt-full: + build: + context: . + dockerfile: ./dockerfile + restart: unless-stopped + container_name: cobalt-full + ports: + - 9000:9000/tcp + environment: + - apiPort=9000 + - apiURL='https://co.wuk.sh/' + - cors=1 diff --git a/dockerfile_api b/docker/dockerfile_api similarity index 100% rename from dockerfile_api rename to docker/dockerfile_api diff --git a/dockerfile_web b/docker/dockerfile_web similarity index 100% rename from dockerfile_web rename to docker/dockerfile_web diff --git a/src/front/cobalt.js b/src/front/cobalt.js index cd77b2d..59ec949 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -19,10 +19,14 @@ const exceptions = { // used for mobile devices "vQuality": "720" }; -const apiURL = ''; +let apiURL = ''; let store = {}; +function changeAPI(url) { + apiURL = url; + return true +} function eid(id) { return document.getElementById(id) }