Trying to enable PRODUCTION docker-compose
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
078e96ec2c
commit
fea610797d
@ -1,4 +1,5 @@
|
|||||||
*
|
*
|
||||||
|
!.babelrc
|
||||||
!*.json
|
!*.json
|
||||||
!*.html
|
!*.html
|
||||||
!*.js
|
!*.js
|
||||||
@ -15,6 +16,8 @@
|
|||||||
!scripts
|
!scripts
|
||||||
!Dockerfile
|
!Dockerfile
|
||||||
!entrypoint.sh
|
!entrypoint.sh
|
||||||
|
node_modules
|
||||||
|
frontend/bower_modules
|
||||||
client/node_modules
|
client/node_modules
|
||||||
server/node_modules
|
server/node_modules
|
||||||
|
|
||||||
|
28
Dockerfile
28
Dockerfile
@ -19,20 +19,34 @@ RUN npm install --global npm@latest
|
|||||||
|
|
||||||
FROM base AS production
|
FROM base AS production
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=NONINTERACTIVE apt-get install -y \
|
||||||
|
git
|
||||||
|
|
||||||
WORKDIR /website
|
WORKDIR /website
|
||||||
COPY /*.html /*.js /*.json /website/
|
COPY /*.json /website/
|
||||||
RUN npm install && npm run build
|
RUN npm upgrade && npm install
|
||||||
|
COPY /.babelrc /*.html /*.js /website/
|
||||||
|
COPY /src /website/src
|
||||||
|
COPY /frontend /website/frontend
|
||||||
|
RUN npm run build
|
||||||
|
RUN ls -altr /website
|
||||||
|
|
||||||
WORKDIR /website/client
|
WORKDIR /website/client
|
||||||
RUN mv ../node_modules .
|
COPY /client/*.json /website/client/
|
||||||
COPY /client/*.js /client/*.json /client/public /client/src /website/client/
|
RUN npm upgrade && npm install
|
||||||
RUN npm install && npm run build
|
COPY /client/*.js /website/client/
|
||||||
|
COPY /client/public /website/client/public
|
||||||
|
COPY /client/src /website/client/src
|
||||||
|
RUN npm run build
|
||||||
|
RUN ls -altr /website/client
|
||||||
|
|
||||||
FROM production AS runtime1
|
RUN echo $DEVELOPMENT
|
||||||
|
|
||||||
|
FROM base AS runtime1
|
||||||
ONBUILD COPY --from=production /website/dist /website/dist
|
ONBUILD COPY --from=production /website/dist /website/dist
|
||||||
ONBUILD COPY --from=production /website/*.html /website/
|
ONBUILD COPY --from=production /website/*.html /website/
|
||||||
ONBUILD COPY --from=production /website/client/*.html /website/client/
|
ONBUILD COPY --from=production /website/client/*.html /website/client/
|
||||||
ONBUILD COPY --from=production /website/client/dist/ /website/client/dist/
|
ONBUILD COPY --from=production /website/client/dist /website/client/dist
|
||||||
|
|
||||||
FROM base AS runtime
|
FROM base AS runtime
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user