diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index a57b53fa..b325d9fa 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -102,29 +102,6 @@ jobs: tags: ${{ env.GITHUB_REF_SLUG }} add_git_labels: true - build-website: - - runs-on: ubuntu-latest - - steps: - - - name: Checkout - uses: actions/checkout@v2 - - # Create a slugified value of the branch - - uses: rlespinasse/github-slug-action@3.1.0 - - - name: "Build and push back image" - uses: docker/build-push-action@v1 - with: - dockerfile: website/Dockerfile - path: website/ - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: thecodingmachine/workadventure-website - tags: ${{ env.GITHUB_REF_SLUG }} - add_git_labels: true - build-maps: runs-on: ubuntu-latest diff --git a/deeployer.libsonnet b/deeployer.libsonnet index 8770ba6f..7ec95742 100644 --- a/deeployer.libsonnet +++ b/deeployer.libsonnet @@ -100,17 +100,6 @@ }, "ports": [80] }, - "website": { - "image": "thecodingmachine/workadventure-website:"+tag, - "host": { - "url": url, - "https": "enable" - }, - "ports": [80], - "env": { - "GAME_URL": "https://play."+url - } - } }, "config": { "https": { diff --git a/docker-compose.yaml b/docker-compose.yaml index 582ce142..8f0ace1d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -135,23 +135,6 @@ services: - "traefik.http.routers.uploader-ssl.tls=true" - "traefik.http.routers.uploader-ssl.service=uploader" - website: - image: thecodingmachine/nodejs:12-apache - environment: - STARTUP_COMMAND_1: npm install - STARTUP_COMMAND_2: npm run watch & - APACHE_DOCUMENT_ROOT: dist/ - volumes: - - ./website:/var/www/html - labels: - - "traefik.http.routers.website.rule=Host(`workadventure.localhost`)" - - "traefik.http.routers.website.entryPoints=web" - - "traefik.http.services.website.loadbalancer.server.port=80" - - "traefik.http.routers.website-ssl.rule=Host(`workadventure.localhost`)" - - "traefik.http.routers.website-ssl.entryPoints=websecure" - - "traefik.http.routers.website-ssl.tls=true" - - "traefik.http.routers.website-ssl.service=website" - messages: #image: thecodingmachine/nodejs:14 image: thecodingmachine/workadventure-back-base:latest diff --git a/website/.gitignore b/website/.gitignore deleted file mode 100644 index cfc08c0e..00000000 --- a/website/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/node_modules/ -/dist/bundle.js -/dist/main.css -/dist/fonts -/dist/images diff --git a/website/Dockerfile b/website/Dockerfile deleted file mode 100644 index d496000e..00000000 --- a/website/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -# we are rebuilding on each deploy to cope with the GAME_URL environment URL -FROM thecodingmachine/nodejs:12-apache - -COPY --chown=docker:docker . . -RUN yarn install - -ENV NODE_ENV=production -ENV STARTUP_COMMAND_1="yarn run build" -ENV APACHE_DOCUMENT_ROOT=dist/ diff --git a/website/README.md b/website/README.md deleted file mode 100644 index 2782b2d0..00000000 --- a/website/README.md +++ /dev/null @@ -1,45 +0,0 @@ -Basic Webpack config for simple website. - -Install all packages: -``` -$ npm install -``` - -Run webpack -``` -$ npm run build -``` - -Done! Open index.html in browser for a cat image. - ----- - -### Notice about production mode and postcss.config.js -In *postcss.config.js* there is a check for **process.env.NODE_ENV** variable. The thing is even if you set Webpack mode to production it *won't* automatically change Node environment variable. - -The simplest way to configure this is to install *cross-env* package: -``` -$ npm install --save-dev cross-env -``` - -Then just add another npm script in *package.json* for production mode: -```javascript -"scripts": { - "build": "webpack --config webpack.config.js", - "build-production": "cross-env NODE_ENV=production webpack --config webpack.config.js" -} -``` - -Now when you run `npm run build-production` the *process.env.NODE_ENV* variable will be production and postcss.config.js check is going to work: -```javascript -if(process.env.NODE_ENV === 'production') { - module.exports = { - plugins: [ - require('autoprefixer'), - require('cssnano') - ] - } -} -``` -[From Webpack documentation](https://webpack.js.org/guides/production/): -Technically, *NODE_ENV* is a system environment variable that Node.js exposes into running scripts. It is used by convention to determine dev-vs-prod behavior by server tools, build scripts, and client-side libraries. Contrary to expectations, *process.env.NODE_ENV* **is not set to "production"** within the build script webpack.config.js. Thus, conditionals like `process.env.NODE_ENV === 'production' ? '[name].[hash].bundle.js' : '[name].bundle.js'` within webpack configurations do not work as expected. diff --git a/website/dist/choose-map.html b/website/dist/choose-map.html deleted file mode 100644 index d32fd638..00000000 --- a/website/dist/choose-map.html +++ /dev/null @@ -1,201 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - -Pick a map that suits your mood! If you don't find what you need, you can always CREATE YOUR OWN MAP.
-Need some inspiration? Enter our CREATIVE SPACE !
-Too late for working ? Just GO TO THE PUB !
-Want to try a SIMPLE OFFICE map ?
-Send your kids BACK TO SCHOOL... and rest a bit ;)
-Dungeons & Dragons Nostalgia ?
-Explore a fantasy world !
-Need a bigger Office? Visit us !
-NO IDEA, or just want to ROAM THE STREETS ? Enter the street map and choose your own path !
-Could not find what you need? No worries, you can always CREATE YOUR OWN MAP.
-Learn how to create your own map! If you want to go the easy route, you can instead PICK A PREBUILT MAP.
-In order to build your own map for WorkAdventure, you need:
-WorkAdventure comes with a "map starter kit" that we recommend using to start designing your map quickly.
- -Start by creating a GitHub account if you don't already have one.
-Then, go to the Github map starter kit repository page - and click the "Use this template" button.
- -You will be prompted to enter a repository name for your map.
- -Be sure to keep the repository "Public".
-In your newly created repository, click on the Settings tab and scroll down to the GitHub Pages section. - Then select the gh-pages branch. It might already be selected, but please be sure to click on it nonetheless (otherwise - GitHub will not enable GitHub pages).
- -Wait a few minutes... Github will deploy a new website with the content of the repository. - The address of the website is visible in the "GitHub Pages" section.
- -Click on the link. You should be redirected directly to WorkAdventure, on your map!
- -Your map is now up and online, but this is still the demo map from the starter kit. You need to customize it.
-Start by cloning the map. If you are used to Git and GitHub, simply clone the map - to your computer using your preferred tool and jump to the next chapter.
-If you are new to Git, cloning the map means downloading the map to your computer. - To do this, you will need Git, or a Git compatible tool. Our advice is to use - GitHub Desktop. We recommend you take some time mastering - the notion of pull / commit / push as this will make uploading your maps really easier.
-As an (easier) alternative, you can simply use the "Export" button to download the code of the map in a big Zip file. - When you want to upload your work again, you will simply drag'n'drop your files in the GitHub website.
- - -The sample map is in the file map.json
.
- You can load this file in Tiled.
Now, it's up to you to edit the map and write your own map.
-Some resources regarding Tiled:
- -In order to design a map that will be readable by WorkAdventure, you will have to respect some constraints.
-In particular, you will need to:
-A few things to notice:
-By default, the characters can traverse any tiles. If you want to prevent your characeter from
- going through a tile (like a wall or a desktop), you must make this tile "collidable". You can do
- this by settings the collides
property on a given tile.
To make a tile "collidable", you should:
- -collides
property. The type of the property must be bool.
- collides
property:Repeat for every tile that should be "collidable".
- -In order to define a default start position, you MUST create a layer named "start" on your map. - This layer MUST contain at least one tile. The players will start on the tile of this layer. - If the layer contains many tiles selected, the players will start randomly on one of those tiles.
- - - -In the screenshot above, the start layer is made of the 2 white tiles. These tiles are - not visible to the end user because they are hidden below the "bottom" layer that displays the floor - of the map.
- -In order to place an exit on your scene that leads to another scene:
-exitUrl
and have tiles that represent exits to another scene.
- Understanding map URLs in WorkAdventure:
- There are 2 kinds of URLs in WorkAdventure:
-
Note: in older releases of WorkAdventure, you could link to a map file directly using properties "exitSceneUrl" and "exitInstance". Those properties are now deprecated. Use "exitUrl" instead.
-Often your map will have several exits, and therefore, several entry points. For instance, if there - is an exit by a door that leads to the garden map, when you come back from the garden you expect to - come back by the same door. Therefore, a map can have several entry points. - Those entry points are "named" (they have a name).
-In order to create a named entry point:
-On your map, you can define special zones. When a player will pass over these zones, a website will open - (as an iframe on the right side of the screen)
-In order to create a zone that opens websites:
-On your map, you can define special zones (meeting rooms) that will trigger the opening of a Jitsi meet. When a player will pass over these zones, a Jitsi meet will open - (as an iframe on the right side of the screen)
-In order to create Jitsi meet zones:
-On your map, you can define special silent zones where nobody is allowed to talk. - In these zones, users will not speak to each others, even if they are next to each others.
-In order to create a silent zone:
-When your changes are ready, you need to "commit" and "push" (i.e. "upload") the changes back to GitHub. - Just wait a few minutes, and your map will be propagated automatically to the GitHub pages web-server.
- -WorkAdventure is a young project and much needs to be said / written regarding map editing.
-If you are facing any troubles, do not hesitate to open an "issue" in the - GitHub WorkAdventure account.
-WorkAdventure is a video-conference application that lets people hold multiple parallel conversations in a virtual universe.
-Walk in, out, speak to anyone just like in real-life!
-Remote work? Friend party? Use WorkAdventure as you prefer.
-Click the button below to come and say hi!
-- - DEMO! -
-You can also create a private room with your friends or your team !
-To try, press button work in private
-- Don’t forget to activate your mic and camera, let’s play -
-- Want to try WorkAdventure with your team mates or friends? -
-- Workadventure is an intuitive and fun solution to professional issues: -
-- Feel free to contact us if you need a specific map, need a dedicated admin console or any - support (for instance a large number of connexions) : workadventure@thecodingmachine.com -
-Instant interaction with up to 4 people
-Share screen with others
-Organize a workshop and meeting with up to 60 people
-Design your own digital space
-... and infinite possibilities
-« Right on time! I feel like less alone in my home office. »
- -« I love running into the hallway and check out where are my teammates! »
- -« Wow! More intimate than a Meet conference. »
- -