diff --git a/Layerfile b/Layerfile index f2eb7e1..07c0492 100644 --- a/Layerfile +++ b/Layerfile @@ -1,21 +1,16 @@ +#This is an example webapp.io configuration for NodeJS FROM vm/ubuntu:18.04 +# To note: Layerfiles create VMs, *not* containers! -# install docker-ce (from tutorial for ubuntu) -RUN apt-get update && \ - apt-get install apt-transport-https ca-certificates curl software-properties-common && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \ - apt-get update && \ - apt install docker-ce +# Install node +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash && \ + apt install nodejs && \ + rm -f /etc/apt/sources.list.d/nodesource.list +RUN npm install -g http-server -# install docker compose -RUN curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ - chmod +x /usr/local/bin/docker-compose +COPY . . +RUN echo 'hello' > hello.html -# copy the root (i.e., repository root) to /root in the runner -COPY / /root - -RUN REPEATABLE docker-compose up -d --build --force-recreate --remove-orphans && sleep 6 - -EXPOSE WEBSITE localhost:8000 +RUN BACKGROUND http-server -p 8000 +EXPOSE WEBSITE http://localhost:8000 diff --git a/services/web/src/index.js b/services/web/src/index.js index 446b0d1..10e15aa 100644 --- a/services/web/src/index.js +++ b/services/web/src/index.js @@ -75,3 +75,4 @@ ReactDOM.render( , document.getElementById('root') ); +// I have doen some changes here