This commit is contained in:
parent
f54f381ef6
commit
df3e9ee1c9
@ -29,12 +29,16 @@ jobs:
|
|||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
file: ./Dockerfile.Node
|
file: ./Dockerfile
|
||||||
tags: fascinated/proxy:node-latest
|
tags: fascinated/proxy:node-latest
|
||||||
|
build-args: |
|
||||||
|
APP=node
|
||||||
|
|
||||||
- name: Build and Push (Proxy)
|
- name: Build and Push (Proxy)
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
file: ./Dockerfile.Proxy
|
file: ./Dockerfile
|
||||||
tags: fascinated/proxy:proxy-latest
|
tags: fascinated/proxy:proxy-latest
|
||||||
|
build-args: |
|
||||||
|
APP=proxy
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
FROM fascinated/docker-images:node-pnpm-latest
|
FROM fascinated/docker-images:node-pnpm-latest
|
||||||
|
|
||||||
|
ARG APP
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Copy root package.json and lockfile
|
# Copy root package.json and lockfile
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
COPY pnpm-lock.yaml ./
|
COPY pnpm-lock.yaml ./
|
||||||
|
|
||||||
# Copy the node package.json
|
# Copy the package.json
|
||||||
COPY apps/node/package.json ./apps/node/package.json
|
COPY apps/${APP}/package.json ./apps/${APP}/package.json
|
||||||
|
|
||||||
RUN pnpm install
|
RUN pnpm install
|
||||||
|
|
||||||
@ -16,4 +18,4 @@ COPY . .
|
|||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD [ "pnpm", "apps/node/index.js" ]
|
CMD [ "pnpm", "apps/${APP}/dist/index.js" ]
|
@ -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" ]
|
|
@ -15,7 +15,7 @@ services:
|
|||||||
|
|
||||||
node-1:
|
node-1:
|
||||||
image: fascinated/proxy:node-latest
|
image: fascinated/proxy:node-latest
|
||||||
container_name: Node 1
|
container_name: Node_1
|
||||||
restart: always
|
restart: always
|
||||||
# Uncomment the ports if you want to access the node directly
|
# Uncomment the ports if you want to access the node directly
|
||||||
#ports:
|
#ports:
|
||||||
@ -27,7 +27,7 @@ services:
|
|||||||
|
|
||||||
node-2:
|
node-2:
|
||||||
image: fascinated/proxy:node-latest
|
image: fascinated/proxy:node-latest
|
||||||
container_name: Node 1
|
container_name: Node_2
|
||||||
restart: always
|
restart: always
|
||||||
# Uncomment the ports if you want to access the node directly
|
# Uncomment the ports if you want to access the node directly
|
||||||
#ports:
|
#ports:
|
||||||
|
Loading…
Reference in New Issue
Block a user