-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FROM node:18-alpine as builder | ||
|
||
# Note: Build this from the root directory: | ||
# cd package-manager | ||
# docker build -f apps/package-manager/app/Dockerfile -t pm-package-manager . | ||
# docker build -t pm-package-manager ../../../.. | ||
|
||
# Environment | ||
|
||
WORKDIR /src | ||
|
||
# Common | ||
|
||
COPY package.json tsconfig.json tsconfig.build.json yarn.lock lerna.json commonPackage.json .yarnrc.yml ./ | ||
COPY scripts ./scripts | ||
COPY .yarn ./.yarn | ||
|
||
# Shared dependencies | ||
COPY shared ./shared | ||
|
||
|
||
# App dependencies | ||
RUN mkdir -p apps/package-manager | ||
COPY apps/package-manager/packages apps/package-manager/packages | ||
|
||
# App | ||
COPY apps/package-manager/app apps/package-manager/app | ||
|
||
# Install | ||
RUN yarn install | ||
|
||
# Build | ||
RUN yarn build | ||
|
||
# Purge dev-dependencies: | ||
RUN yarn workspaces focus -A --production | ||
|
||
RUN rm -r scripts | ||
|
||
|
||
# Create deploy-image: | ||
FROM node:18-alpine | ||
|
||
COPY --from=builder /src /src | ||
|
||
|
||
WORKDIR /src/apps/package-manager/app | ||
ENV package-manager_PORT=8070 | ||
EXPOSE 8070 | ||
|
||
CMD ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FROM node:18-alpine as builder | ||
|
||
# Note: Build this from the root directory: | ||
# cd package-manager | ||
# docker build -f apps/workforce/app/Dockerfile -t pm-workforce . | ||
# docker build -t pm-workforce ../../../.. | ||
|
||
# Environment | ||
|
||
WORKDIR /src | ||
|
||
# Common | ||
|
||
COPY package.json tsconfig.json tsconfig.build.json yarn.lock lerna.json commonPackage.json .yarnrc.yml ./ | ||
COPY scripts ./scripts | ||
COPY .yarn ./.yarn | ||
|
||
# Shared dependencies | ||
COPY shared ./shared | ||
|
||
|
||
# App dependencies | ||
RUN mkdir -p apps/workforce | ||
COPY apps/workforce/packages apps/workforce/packages | ||
|
||
# App | ||
COPY apps/workforce/app apps/workforce/app | ||
|
||
# Install | ||
RUN yarn install | ||
|
||
# Build | ||
RUN yarn build | ||
|
||
# Purge dev-dependencies: | ||
RUN yarn workspaces focus -A --production | ||
|
||
RUN rm -r scripts | ||
|
||
|
||
# Create deploy-image: | ||
FROM node:18-alpine | ||
|
||
COPY --from=builder /src /src | ||
|
||
|
||
WORKDIR /src/apps/workforce/app | ||
ENV WORKFORCE_PORT=8070 | ||
EXPOSE 8070 | ||
|
||
CMD ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters