Fixing Docker build images to add new messages directory

This commit is contained in:
David Négrier 2020-09-18 17:18:50 +02:00
parent 32f92d5c45
commit 7826b2ea8d
4 changed files with 9 additions and 5 deletions

View File

@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v1
with:
dockerfile: front/Dockerfile
path: front/
path: ./
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: thecodingmachine/workadventure-front
@ -49,7 +49,7 @@ jobs:
uses: docker/build-push-action@v1
with:
dockerfile: back/Dockerfile
path: back/
path: ./
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: thecodingmachine/workadventure-back

View File

@ -1,7 +1,9 @@
FROM thecodingmachine/nodejs:12
COPY --chown=docker:docker . .
COPY --chown=docker:docker back .
COPY --chown=docker:docker messages ../messages
RUN yarn install
RUN cd /usr/src/messages && yarn install
ENV NODE_ENV=production

View File

@ -8,7 +8,7 @@ import {BatchMessage, SubMessage} from "../../../../messages/generated/messages_
export interface ExSocketInterface extends Socket, Identificable {
token: string;
roomId: string;
webRtcRoomId: string;
webRtcRoomId: string|undefined;
userId: number; // A temporary (autoincremented) identifier for this user
userUuid: string; // A unique identifier for this user
name: string;

View File

@ -1,8 +1,10 @@
# we are rebuilding on each deploy to cope with the API_URL environment URL
FROM thecodingmachine/nodejs:14-apache
COPY --chown=docker:docker . .
COPY --chown=docker:docker front .
COPY --chown=docker:docker messages /var/www/messages
RUN yarn install
RUN cd /usr/src/messages && yarn install
ENV NODE_ENV=production
ENV STARTUP_COMMAND_1="yarn run build"