Change serve dir in container to /var/www
This commit is contained in:
parent
ee45331b4d
commit
a90feaffdf
2 changed files with 5 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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:<port>`.
|
||||
|
||||
### 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"
|
||||
```
|
||||
|
|
Reference in a new issue