From d20e85eba6c9168b2cae5a35f08d53464e69ab4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 1 Jun 2020 16:05:01 +0200 Subject: [PATCH] Dockerising the landing_page --- docker-compose.yaml | 14 +++++++++- landing_page/.gitignore | 5 +++- landing_page/{ => dist}/index.html | 24 +++++++++--------- .../{src => dist/static}/images/amstrad.png | Bin .../{src => dist/static}/images/atari.png | Bin .../{src => dist/static}/images/bitmap.png | Bin .../{src => dist/static}/images/logo.png | Bin .../static}/images/sinclair-2.png | Bin .../static}/images/super-nintendo.png | Bin 9 files changed, 29 insertions(+), 14 deletions(-) rename landing_page/{ => dist}/index.html (86%) rename landing_page/{src => dist/static}/images/amstrad.png (100%) rename landing_page/{src => dist/static}/images/atari.png (100%) rename landing_page/{src => dist/static}/images/bitmap.png (100%) rename landing_page/{src => dist/static}/images/logo.png (100%) rename landing_page/{src => dist/static}/images/sinclair-2.png (100%) rename landing_page/{src => dist/static}/images/super-nintendo.png (100%) diff --git a/docker-compose.yaml b/docker-compose.yaml index ca2197a8..fb953bb9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -25,7 +25,7 @@ services: volumes: - ./front:/usr/src/app labels: - - "traefik.http.routers.front.rule=Host(`workadventure.localhost`)" + - "traefik.http.routers.front.rule=Host(`play.workadventure.localhost`)" - "traefik.http.services.front.loadbalancer.server.port=8080" back: @@ -39,3 +39,15 @@ services: labels: - "traefik.http.routers.back.rule=Host(`api.workadventure.localhost`)" - "traefik.http.services.back.loadbalancer.server.port=8080" + + website: + image: thecodingmachine/nodejs:12-apache + environment: + STARTUP_COMMAND_1: npm install + STARTUP_COMMAND_2: npm run watch & + APACHE_DOCUMENT_ROOT: dist/ + volumes: + - ./landing_page:/var/www/html + labels: + - "traefik.http.routers.website.rule=Host(`workadventure.localhost`)" + - "traefik.http.services.website.loadbalancer.server.port=80" diff --git a/landing_page/.gitignore b/landing_page/.gitignore index c85804c9..cfc08c0e 100644 --- a/landing_page/.gitignore +++ b/landing_page/.gitignore @@ -1,2 +1,5 @@ /node_modules/ -/dist/ \ No newline at end of file +/dist/bundle.js +/dist/main.css +/dist/fonts +/dist/images diff --git a/landing_page/index.html b/landing_page/dist/index.html similarity index 86% rename from landing_page/index.html rename to landing_page/dist/index.html index 4e9cad93..3e361bee 100644 --- a/landing_page/index.html +++ b/landing_page/dist/index.html @@ -4,9 +4,9 @@ WorkAdventu.re - - - + + + @@ -14,7 +14,7 @@

Discover a pixelated new world !

@@ -31,19 +31,19 @@
- +

Choose your map

- +

Select your character

- +

Let's go explore and talk !

@@ -64,16 +64,16 @@

Used by millions of people worldwilde and companies such as :

- +
- +
- +
- +
@@ -101,4 +101,4 @@
- \ No newline at end of file + diff --git a/landing_page/src/images/amstrad.png b/landing_page/dist/static/images/amstrad.png similarity index 100% rename from landing_page/src/images/amstrad.png rename to landing_page/dist/static/images/amstrad.png diff --git a/landing_page/src/images/atari.png b/landing_page/dist/static/images/atari.png similarity index 100% rename from landing_page/src/images/atari.png rename to landing_page/dist/static/images/atari.png diff --git a/landing_page/src/images/bitmap.png b/landing_page/dist/static/images/bitmap.png similarity index 100% rename from landing_page/src/images/bitmap.png rename to landing_page/dist/static/images/bitmap.png diff --git a/landing_page/src/images/logo.png b/landing_page/dist/static/images/logo.png similarity index 100% rename from landing_page/src/images/logo.png rename to landing_page/dist/static/images/logo.png diff --git a/landing_page/src/images/sinclair-2.png b/landing_page/dist/static/images/sinclair-2.png similarity index 100% rename from landing_page/src/images/sinclair-2.png rename to landing_page/dist/static/images/sinclair-2.png diff --git a/landing_page/src/images/super-nintendo.png b/landing_page/dist/static/images/super-nintendo.png similarity index 100% rename from landing_page/src/images/super-nintendo.png rename to landing_page/dist/static/images/super-nintendo.png