diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 3a3cda7..fc55c9c 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -29,12 +29,16 @@ jobs: uses: docker/build-push-action@v4 with: push: true - file: ./Dockerfile.Node + file: ./Dockerfile tags: fascinated/proxy:node-latest + build-args: | + APP=node - name: Build and Push (Proxy) uses: docker/build-push-action@v4 with: push: true - file: ./Dockerfile.Proxy + file: ./Dockerfile tags: fascinated/proxy:proxy-latest + build-args: | + APP=proxy diff --git a/Dockerfile.Node b/Dockerfile similarity index 61% rename from Dockerfile.Node rename to Dockerfile index 6f74371..eb36bc1 100644 --- a/Dockerfile.Node +++ b/Dockerfile @@ -1,13 +1,15 @@ FROM fascinated/docker-images:node-pnpm-latest - + +ARG APP + WORKDIR /usr/src/app # Copy root package.json and lockfile COPY package.json ./ COPY pnpm-lock.yaml ./ -# Copy the node package.json -COPY apps/node/package.json ./apps/node/package.json +# Copy the package.json +COPY apps/${APP}/package.json ./apps/${APP}/package.json RUN pnpm install @@ -16,4 +18,4 @@ COPY . . EXPOSE 3000 -CMD [ "pnpm", "apps/node/index.js" ] \ No newline at end of file +CMD [ "pnpm", "apps/${APP}/dist/index.js" ] \ No newline at end of file diff --git a/Dockerfile.Proxy b/Dockerfile.Proxy deleted file mode 100644 index 5e34dc1..0000000 --- a/Dockerfile.Proxy +++ /dev/null @@ -1,19 +0,0 @@ -FROM fascinated/docker-images:node-pnpm-latest - -WORKDIR /usr/src/app - -# Copy root package.json and lockfile -COPY package.json ./ -COPY pnpm-lock.yaml ./ - -# Copy the proxy package.json -COPY apps/proxy/package.json ./apps/proxy/package.json - -RUN pnpm install - -# Copy app source -COPY . . - -EXPOSE 3000 - -CMD [ "pnpm", "apps/proxy/index.js" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index ada2fb1..a8ba16c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: node-1: image: fascinated/proxy:node-latest - container_name: Node 1 + container_name: Node_1 restart: always # Uncomment the ports if you want to access the node directly #ports: @@ -27,7 +27,7 @@ services: node-2: image: fascinated/proxy:node-latest - container_name: Node 1 + container_name: Node_2 restart: always # Uncomment the ports if you want to access the node directly #ports: