From cc44bfac77704eae18a1b1d1bbb20a95748bcda8 Mon Sep 17 00:00:00 2001 From: Lurkars Date: Thu, 13 May 2021 16:13:07 +0200 Subject: [PATCH 1/8] port --- front/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/webpack.config.ts b/front/webpack.config.ts index 336cad82..5503aa43 100644 --- a/front/webpack.config.ts +++ b/front/webpack.config.ts @@ -20,7 +20,7 @@ module.exports = { devServer: { contentBase: './dist', host: '0.0.0.0', - sockPort: 80, + sockPort: 443, disableHostCheck: true, historyApiFallback: { rewrites: [ From c0b09db05e6fcccd8dcbce02c31c918881cbdb3c Mon Sep 17 00:00:00 2001 From: Lurkars Date: Wed, 21 Jul 2021 19:29:45 +0200 Subject: [PATCH 2/8] change port back --- front/webpack.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/webpack.config.ts b/front/webpack.config.ts index 757e934b..62fee59b 100644 --- a/front/webpack.config.ts +++ b/front/webpack.config.ts @@ -24,8 +24,8 @@ module.exports = { mode: mode, devtool: isDevelopment ? "inline-source-map" : "source-map", devServer: { - contentBase: './dist', - host: '0.0.0.0', + contentBase: "./dist", + host: "0.0.0.0", sockPort: 443, disableHostCheck: true, historyApiFallback: { From e584c16aaaa0e2a69b3c4fb8ef0fbc17dd0024c8 Mon Sep 17 00:00:00 2001 From: Lurkars Date: Wed, 1 Sep 2021 19:25:05 +0200 Subject: [PATCH 3/8] socket --- front/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/webpack.config.ts b/front/webpack.config.ts index a6794ec7..39a00828 100644 --- a/front/webpack.config.ts +++ b/front/webpack.config.ts @@ -26,7 +26,7 @@ module.exports = { devServer: { contentBase: "./dist", host: "0.0.0.0", - sockPort: 443, + sockPort: 80, disableHostCheck: true, historyApiFallback: { rewrites: [{ from: /^_\/.*$/, to: "/index.html" }], From 09125621d898ebe6193ef8fd69ede524b5c754f6 Mon Sep 17 00:00:00 2001 From: Lurkars Date: Mon, 6 Sep 2021 19:16:05 +0200 Subject: [PATCH 4/8] update gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 8fa69985..3e56b379 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ .vagrant Vagrantfile docker-compose.override.yaml +docker-compose.dev.* +.env.dev.* *.DS_Store maps/yarn.lock maps/dist/computer.js From 36df585a5e84d5074190adcb2a46ac627747063b Mon Sep 17 00:00:00 2001 From: Lurkars Date: Thu, 9 Sep 2021 08:47:38 +0200 Subject: [PATCH 5/8] fix wrong layer names after re-enter room --- front/src/Phaser/Map/LayersFlattener.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/Phaser/Map/LayersFlattener.ts b/front/src/Phaser/Map/LayersFlattener.ts index d28402b5..fabce94b 100644 --- a/front/src/Phaser/Map/LayersFlattener.ts +++ b/front/src/Phaser/Map/LayersFlattener.ts @@ -10,7 +10,7 @@ export function flattenGroupLayersMap(map: ITiledMap) { } function flattenGroupLayers(layers: ITiledMapLayer[], prefix: string, flatLayers: ITiledMapLayer[]) { - for (const layer of layers) { + for (const layer of layers.map((layer) => ({ ...layer }))) { if (layer.type === "group") { flattenGroupLayers(layer.layers, prefix + layer.name + "/", flatLayers); } else { From 30b22d87a6e855f6def3e0491ea577d621bf64a5 Mon Sep 17 00:00:00 2001 From: Lurkars Date: Thu, 9 Sep 2021 08:50:57 +0200 Subject: [PATCH 6/8] .gitignore to upstream --- .env.dev.localhost.single | 24 ++++ .gitignore | 4 +- docker-compose.dev.localhost.single.yaml | 146 +++++++++++++++++++++++ 3 files changed, 171 insertions(+), 3 deletions(-) create mode 100644 .env.dev.localhost.single create mode 100755 docker-compose.dev.localhost.single.yaml diff --git a/.env.dev.localhost.single b/.env.dev.localhost.single new file mode 100644 index 00000000..a75de386 --- /dev/null +++ b/.env.dev.localhost.single @@ -0,0 +1,24 @@ +DEBUG_MODE=false +JITSI_URL=meet.jit.si +JITSI_PRIVATE_MODE=false +JITSI_ISS= +SECRET_JITSI_KEY= +ADMIN_API_TOKEN=123 +START_ROOM_URL=/_/global/workadventure.localhost/maps/Floor0/floor0.json + +STUN_SERVER=stun:stun.l.google.com:19302 +TURN_SERVER=turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443 +TURN_STATIC_AUTH_SECRET= + +DISABLE_NOTIFICATIONS=true +SKIP_RENDER_OPTIMIZATIONS=false + +ACME_EMAIL= + +MAX_PER_GROUP=4 +MAX_USERNAME_LENGTH=8 + +FRONT_URL= +OPID_CLIENT_ID= +OPID_CLIENT_SECRET= +OPID_CLIENT_ISSUER= diff --git a/.gitignore b/.gitignore index 3e56b379..2acc9cf7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,9 @@ .vagrant Vagrantfile docker-compose.override.yaml -docker-compose.dev.* -.env.dev.* *.DS_Store maps/yarn.lock maps/dist/computer.js maps/dist/computer.js.map node_modules -_ \ No newline at end of file +_ diff --git a/docker-compose.dev.localhost.single.yaml b/docker-compose.dev.localhost.single.yaml new file mode 100755 index 00000000..a12dbc34 --- /dev/null +++ b/docker-compose.dev.localhost.single.yaml @@ -0,0 +1,146 @@ +version: "3.3" +services: + reverse-proxy: + image: traefik:v2.5 + command: + - --api.insecure=true + - --providers.docker + - --entryPoints.web.address=:80 + - --entryPoints.websecure.address=:443 + ports: + - "80:80" + - "443:443" + depends_on: + - back + - front + volumes: + - /var/run/docker.sock:/var/run/docker.sock + + front: + image: thecodingmachine/nodejs:14 + environment: + DEBUG_MODE: "$DEBUG_MODE" + JITSI_URL: $JITSI_URL + JITSI_PRIVATE_MODE: "$JITSI_PRIVATE_MODE" + PUSHER_URL: /pusher + STARTUP_COMMAND_1: ./templater.sh + STARTUP_COMMAND_2: yarn install --ignore-engines + TURN_SERVER: "${TURN_SERVER}" + TURN_USER: "${TURN_USER}" + STUN_SERVER: "${STUN_SERVER}" + TURN_PASSWORD: "${TURN_PASSWORD}" + MAX_PER_GROUP: "${MAX_PER_GROUP}" + MAX_USERNAME_LENGTH: "${MAX_USERNAME_LENGTH}" + START_ROOM_URL: "${START_ROOM_URL}" + DISABLE_NOTIFICATIONS: "${DISABLE_NOTIFICATIONS}" + SKIP_RENDER_OPTIMIZATIONS: "${SKIP_RENDER_OPTIMIZATIONS}" + command: yarn run start + volumes: + - ./front:/usr/src/app + labels: + - "traefik.http.routers.front.rule=PathPrefix(`/`)" + - "traefik.http.routers.front.entryPoints=web" + - "traefik.http.routers.front.service=front" + - "traefik.http.services.front.loadbalancer.server.port=8080" + - "traefik.http.routers.front-ssl.rule=PathPrefix(`/`)" + - "traefik.http.routers.front-ssl.entryPoints=websecure" + - "traefik.http.routers.front-ssl.tls=true" + - "traefik.http.routers.front-ssl.service=front" + + pusher: + image: thecodingmachine/nodejs:12 + command: yarn dev + environment: + #DEBUG: "*" + STARTUP_COMMAND_1: yarn install + SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}" + SECRET_KEY: "${SECRET_KEY}" + API_URL: back:50051 + ADMIN_API_URL: "${ADMIN_API_URL}" + ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}" + JITSI_URL: ${JITSI_URL} + JITSI_ISS: ${JITSI_ISS} + FRONT_URL : ${FRONT_URL} + OPID_CLIENT_ID: ${OPID_CLIENT_ID} + OPID_CLIENT_SECRET: ${OPID_CLIENT_SECRET} + OPID_CLIENT_ISSUER: ${OPID_CLIENT_ISSUER} + volumes: + - ./pusher:/usr/src/app + labels: + - "traefik.http.middlewares.strip-pusher-prefix.stripprefix.prefixes=/pusher" + - "traefik.http.routers.pusher.middlewares=strip-pusher-prefix@docker" + - "traefik.http.routers.pusher.rule=PathPrefix(`/pusher`)" + - "traefik.http.routers.pusher.entryPoints=web" + - "traefik.http.routers.pusher.service=pusher" + - "traefik.http.services.pusher.loadbalancer.server.port=8080" + - "traefik.http.routers.pusher-ssl.rule=PathPrefix(`/pusher`)" + - "traefik.http.routers.pusher-ssl.middlewares=strip-pusher-prefix@docker" + - "traefik.http.routers.pusher-ssl.entryPoints=websecure" + - "traefik.http.routers.pusher-ssl.tls=true" + - "traefik.http.routers.pusher-ssl.service=pusher" + + maps: + image: thecodingmachine/nodejs:12-apache + environment: + DEBUG_MODE: "$DEBUG_MODE" + HOST: "0.0.0.0" + NODE_ENV: development + STARTUP_COMMAND_0: sudo a2enmod headers + STARTUP_COMMAND_1: yarn install + STARTUP_COMMAND_2: yarn run dev & + volumes: + - ./maps:/var/www/html + labels: + - "traefik.http.middlewares.strip-maps-prefix.stripprefix.prefixes=/maps" + - "traefik.http.routers.maps.rule=PathPrefix(`/maps`)" + - "traefik.http.routers.maps.middlewares=strip-maps-prefix@docker" + - "traefik.http.routers.maps.entryPoints=web,traefik" + - "traefik.http.services.maps.loadbalancer.server.port=80" + - "traefik.http.routers.maps-ssl.rule=PathPrefix(`/maps`)" + - "traefik.http.routers.maps-ssl.middlewares=strip-maps-prefix@docker" + - "traefik.http.routers.maps-ssl.entryPoints=websecure" + - "traefik.http.routers.maps-ssl.tls=true" + - "traefik.http.routers.maps-ssl.service=maps" + + back: + image: thecodingmachine/nodejs:12 + command: yarn dev + environment: + #DEBUG: "*" + STARTUP_COMMAND_1: yarn install + SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}" + ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}" + ADMIN_API_URL: "${ADMIN_API_URL}" + JITSI_URL: ${JITSI_URL} + JITSI_ISS: ${JITSI_ISS} + MAX_PER_GROUP: ${MAX_PER_GROUP} + REDIS_HOST: redis + NODE_ENV: development + volumes: + - ./back:/usr/src/app + labels: + - "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api" + - "traefik.http.routers.back.middlewares=strip-api-prefix@docker" + - "traefik.http.routers.back.rule=PathPrefix(`/api`)" + - "traefik.http.routers.back.entryPoints=web" + - "traefik.http.routers.back.service=back" + - "traefik.http.services.back.loadbalancer.server.port=8080" + - "traefik.http.routers.back-ssl.rule=PathPrefix(`/api`)" + - "traefik.http.routers.back-ssl.middlewares=strip-api-prefix@docker" + - "traefik.http.routers.back-ssl.entryPoints=websecure" + - "traefik.http.routers.back-ssl.tls=true" + - "traefik.http.routers.back-ssl.service=back" + + messages: + image: thecodingmachine/workadventure-back-base:latest + environment: + STARTUP_COMMAND_1: yarn install + STARTUP_COMMAND_2: yarn run proto:watch + volumes: + - ./messages:/usr/src/app + - ./back:/usr/src/back + - ./front:/usr/src/front + - ./pusher:/usr/src/pusher + + redis: + image: redis:6 From 8dd404801a182b0131f715fa0885acbc323dc1ce Mon Sep 17 00:00:00 2001 From: Lurkars Date: Thu, 9 Sep 2021 08:51:20 +0200 Subject: [PATCH 7/8] .gitignore to upstream --- .env.dev.localhost.single | 24 ---- docker-compose.dev.localhost.single.yaml | 146 ----------------------- 2 files changed, 170 deletions(-) delete mode 100644 .env.dev.localhost.single delete mode 100755 docker-compose.dev.localhost.single.yaml diff --git a/.env.dev.localhost.single b/.env.dev.localhost.single deleted file mode 100644 index a75de386..00000000 --- a/.env.dev.localhost.single +++ /dev/null @@ -1,24 +0,0 @@ -DEBUG_MODE=false -JITSI_URL=meet.jit.si -JITSI_PRIVATE_MODE=false -JITSI_ISS= -SECRET_JITSI_KEY= -ADMIN_API_TOKEN=123 -START_ROOM_URL=/_/global/workadventure.localhost/maps/Floor0/floor0.json - -STUN_SERVER=stun:stun.l.google.com:19302 -TURN_SERVER=turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443 -TURN_STATIC_AUTH_SECRET= - -DISABLE_NOTIFICATIONS=true -SKIP_RENDER_OPTIMIZATIONS=false - -ACME_EMAIL= - -MAX_PER_GROUP=4 -MAX_USERNAME_LENGTH=8 - -FRONT_URL= -OPID_CLIENT_ID= -OPID_CLIENT_SECRET= -OPID_CLIENT_ISSUER= diff --git a/docker-compose.dev.localhost.single.yaml b/docker-compose.dev.localhost.single.yaml deleted file mode 100755 index a12dbc34..00000000 --- a/docker-compose.dev.localhost.single.yaml +++ /dev/null @@ -1,146 +0,0 @@ -version: "3.3" -services: - reverse-proxy: - image: traefik:v2.5 - command: - - --api.insecure=true - - --providers.docker - - --entryPoints.web.address=:80 - - --entryPoints.websecure.address=:443 - ports: - - "80:80" - - "443:443" - depends_on: - - back - - front - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - front: - image: thecodingmachine/nodejs:14 - environment: - DEBUG_MODE: "$DEBUG_MODE" - JITSI_URL: $JITSI_URL - JITSI_PRIVATE_MODE: "$JITSI_PRIVATE_MODE" - PUSHER_URL: /pusher - STARTUP_COMMAND_1: ./templater.sh - STARTUP_COMMAND_2: yarn install --ignore-engines - TURN_SERVER: "${TURN_SERVER}" - TURN_USER: "${TURN_USER}" - STUN_SERVER: "${STUN_SERVER}" - TURN_PASSWORD: "${TURN_PASSWORD}" - MAX_PER_GROUP: "${MAX_PER_GROUP}" - MAX_USERNAME_LENGTH: "${MAX_USERNAME_LENGTH}" - START_ROOM_URL: "${START_ROOM_URL}" - DISABLE_NOTIFICATIONS: "${DISABLE_NOTIFICATIONS}" - SKIP_RENDER_OPTIMIZATIONS: "${SKIP_RENDER_OPTIMIZATIONS}" - command: yarn run start - volumes: - - ./front:/usr/src/app - labels: - - "traefik.http.routers.front.rule=PathPrefix(`/`)" - - "traefik.http.routers.front.entryPoints=web" - - "traefik.http.routers.front.service=front" - - "traefik.http.services.front.loadbalancer.server.port=8080" - - "traefik.http.routers.front-ssl.rule=PathPrefix(`/`)" - - "traefik.http.routers.front-ssl.entryPoints=websecure" - - "traefik.http.routers.front-ssl.tls=true" - - "traefik.http.routers.front-ssl.service=front" - - pusher: - image: thecodingmachine/nodejs:12 - command: yarn dev - environment: - #DEBUG: "*" - STARTUP_COMMAND_1: yarn install - SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}" - SECRET_KEY: "${SECRET_KEY}" - API_URL: back:50051 - ADMIN_API_URL: "${ADMIN_API_URL}" - ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}" - JITSI_URL: ${JITSI_URL} - JITSI_ISS: ${JITSI_ISS} - FRONT_URL : ${FRONT_URL} - OPID_CLIENT_ID: ${OPID_CLIENT_ID} - OPID_CLIENT_SECRET: ${OPID_CLIENT_SECRET} - OPID_CLIENT_ISSUER: ${OPID_CLIENT_ISSUER} - volumes: - - ./pusher:/usr/src/app - labels: - - "traefik.http.middlewares.strip-pusher-prefix.stripprefix.prefixes=/pusher" - - "traefik.http.routers.pusher.middlewares=strip-pusher-prefix@docker" - - "traefik.http.routers.pusher.rule=PathPrefix(`/pusher`)" - - "traefik.http.routers.pusher.entryPoints=web" - - "traefik.http.routers.pusher.service=pusher" - - "traefik.http.services.pusher.loadbalancer.server.port=8080" - - "traefik.http.routers.pusher-ssl.rule=PathPrefix(`/pusher`)" - - "traefik.http.routers.pusher-ssl.middlewares=strip-pusher-prefix@docker" - - "traefik.http.routers.pusher-ssl.entryPoints=websecure" - - "traefik.http.routers.pusher-ssl.tls=true" - - "traefik.http.routers.pusher-ssl.service=pusher" - - maps: - image: thecodingmachine/nodejs:12-apache - environment: - DEBUG_MODE: "$DEBUG_MODE" - HOST: "0.0.0.0" - NODE_ENV: development - STARTUP_COMMAND_0: sudo a2enmod headers - STARTUP_COMMAND_1: yarn install - STARTUP_COMMAND_2: yarn run dev & - volumes: - - ./maps:/var/www/html - labels: - - "traefik.http.middlewares.strip-maps-prefix.stripprefix.prefixes=/maps" - - "traefik.http.routers.maps.rule=PathPrefix(`/maps`)" - - "traefik.http.routers.maps.middlewares=strip-maps-prefix@docker" - - "traefik.http.routers.maps.entryPoints=web,traefik" - - "traefik.http.services.maps.loadbalancer.server.port=80" - - "traefik.http.routers.maps-ssl.rule=PathPrefix(`/maps`)" - - "traefik.http.routers.maps-ssl.middlewares=strip-maps-prefix@docker" - - "traefik.http.routers.maps-ssl.entryPoints=websecure" - - "traefik.http.routers.maps-ssl.tls=true" - - "traefik.http.routers.maps-ssl.service=maps" - - back: - image: thecodingmachine/nodejs:12 - command: yarn dev - environment: - #DEBUG: "*" - STARTUP_COMMAND_1: yarn install - SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}" - ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}" - ADMIN_API_URL: "${ADMIN_API_URL}" - JITSI_URL: ${JITSI_URL} - JITSI_ISS: ${JITSI_ISS} - MAX_PER_GROUP: ${MAX_PER_GROUP} - REDIS_HOST: redis - NODE_ENV: development - volumes: - - ./back:/usr/src/app - labels: - - "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api" - - "traefik.http.routers.back.middlewares=strip-api-prefix@docker" - - "traefik.http.routers.back.rule=PathPrefix(`/api`)" - - "traefik.http.routers.back.entryPoints=web" - - "traefik.http.routers.back.service=back" - - "traefik.http.services.back.loadbalancer.server.port=8080" - - "traefik.http.routers.back-ssl.rule=PathPrefix(`/api`)" - - "traefik.http.routers.back-ssl.middlewares=strip-api-prefix@docker" - - "traefik.http.routers.back-ssl.entryPoints=websecure" - - "traefik.http.routers.back-ssl.tls=true" - - "traefik.http.routers.back-ssl.service=back" - - messages: - image: thecodingmachine/workadventure-back-base:latest - environment: - STARTUP_COMMAND_1: yarn install - STARTUP_COMMAND_2: yarn run proto:watch - volumes: - - ./messages:/usr/src/app - - ./back:/usr/src/back - - ./front:/usr/src/front - - ./pusher:/usr/src/pusher - - redis: - image: redis:6 From 05307355474586ff777a564c8db77fbdde3e9af8 Mon Sep 17 00:00:00 2001 From: Lurkars Date: Thu, 9 Sep 2021 08:52:24 +0200 Subject: [PATCH 8/8] .gitignore to upstream --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2acc9cf7..8fa69985 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ maps/yarn.lock maps/dist/computer.js maps/dist/computer.js.map node_modules -_ +_ \ No newline at end of file