From a90feaffdfbe7cabdf9267c1b7c89c46f5ac4bf2 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 4 May 2018 21:01:01 +0100 Subject: [PATCH] Change serve dir in container to /var/www --- Dockerfile | 5 ++--- README.md | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0ff2ea2..24f8458 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,10 @@ COPY ./src /app/src COPY ./package.json /app/package.json COPY ./package-lock.json /app/package-lock.json COPY ./tsconfig.json /app/tsconfig.json +COPY ./site /var/www WORKDIR /app -RUN mkdir -p /public - RUN apk add --no-cache git RUN npm install @@ -19,6 +18,6 @@ RUN npm run build RUN npm prune --production -CMD npm start -- /public +CMD npm start -- /var/www EXPOSE 5000 diff --git a/README.md b/README.md index 9186e73..d1d8b79 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The only static-file server you'll ever need! The port for the server to listen on. Currently supports plain HTTP only ##### `basic-auth` -Enable basic-auth for all paths. Currently only supports single credentals. +Enable basic-auth for all paths. Currently only supports single credentals. Format:`-b username:password` @@ -53,7 +53,7 @@ Enables directory listing. Allow browseing Open the server in the browser one started. It will open in your default browser, and use url `http://0.0.0.0:`. ### Docker -Included in this repo is a `Dockerfile` to use. The default setup requires being run from the project directory, and will serve `/public` in the container on port `5000`. By default, this directory is empty, however can be overriden. +Included in this repo is a `Dockerfile` to use. The default setup requires being run from the project directory, and will serve `/var/www` in the container on port `5000`. By default, this directory is empty, however can be overriden. Below is an example `docker-compose.yml` file you can use with it: @@ -66,7 +66,7 @@ services: context: . dockerfile: Dockerfile volumes: - - ./site/:/public + - ./site/:/var/www ports: - "5000:5000" ```