Move install location to /opt and install globally

This commit is contained in:
Jake Howard 2018-05-05 12:01:07 +01:00
parent 0d311ac19c
commit 3caa4a51db
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -1,12 +1,12 @@
FROM node:8-alpine
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 ./src /opt/tstatic/src
COPY ./package.json opt/tstatic/package.json
COPY ./package-lock.json opt/tstatic/package-lock.json
COPY ./tsconfig.json opt/tstatic/tsconfig.json
COPY ./site /var/www
WORKDIR /app
WORKDIR /opt/tstatic
RUN apk add --no-cache git
@ -18,6 +18,10 @@ RUN npm run build
RUN npm prune --production
CMD npm start -- /var/www
RUN npm install -g .
WORKDIR /
CMD tstatic /var/www
EXPOSE 5000