Using multistage builds with protocol buffers
This commit is contained in:
parent
d3116c7400
commit
d2a5060ad2
2 changed files with 12 additions and 4 deletions
|
@ -1,10 +1,14 @@
|
|||
FROM thecodingmachine/workadventure-back-base:latest as builder
|
||||
WORKDIR /var/www/messages
|
||||
COPY --chown=docker:docker messages .
|
||||
RUN yarn install && yarn proto
|
||||
|
||||
# we are rebuilding on each deploy to cope with the API_URL environment URL
|
||||
FROM thecodingmachine/nodejs:14-apache
|
||||
|
||||
COPY --chown=docker:docker front .
|
||||
COPY --chown=docker:docker messages /var/www/messages
|
||||
COPY --from=builder --chown=docker:docker /var/www/messages /var/www/messages
|
||||
RUN yarn install
|
||||
RUN cd /var/www/messages && yarn install && yarn proto
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV STARTUP_COMMAND_1="yarn run build"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue