From 72b86f6a176d26058620e5734ef985e909b44ebe Mon Sep 17 00:00:00 2001 From: scx1332 Date: Sat, 13 Apr 2024 16:32:12 +0200 Subject: [PATCH] feat: try new deploy solution #38 --- Dockerfile | 9 --------- deploy/docker-compose.yml | 12 ++++++++++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8dbd734..7806e8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,3 @@ RUN apt-get update && apt-get install -y vim RUN npm install -g pnpm serve pm2 # Set the working directory WORKDIR /app -COPY . /app - -ARG BACKEND_URL -ENV VITE_BACKEND_URL=$BACKEND_URL -RUN echo "The backend URL is $BACKEND_URL" -RUN mkdir /app/temp - -RUN pnpm install -RUN pnpm build:all diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index e3e365d..e5843b7 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -1,7 +1,9 @@ services: # application service backend: - image: ghcr.io/golemfactory/deposit_example:${DEPLOY_BRANCH:-latest} + build: + context: ../ + dockerfile: Dockerfile command: pnpm run start working_dir: /app/backend environment: @@ -21,9 +23,13 @@ services: depends_on: - yagna - mongo + volumes: + - ../:/app frontend: - image: ghcr.io/golemfactory/deposit_example:${DEPLOY_BRANCH:-latest} + build: + context: ../ + dockerfile: Dockerfile command: pnpm run start working_dir: /app/frontend environment: @@ -42,6 +48,8 @@ services: - "3000:3000" depends_on: - backend + volumes: + - ../:/app # yagna service yagna: build: