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) }