-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@uppy/companion: fix Dockerfile and deploy automation (#3355)
* attempt at fixing dockerfile that works with yarn workspaces and respects yarn.lock * run corepack yarn * update Dockerfile references * remove unneccesary yarn plugin import * Apply suggestions from code review Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]>
- Loading branch information
Showing
13 changed files
with
45 additions
and
40 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,4 @@ | ||
**/node_modules | ||
.git | ||
website | ||
assets |
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
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,33 @@ | ||
FROM node:16.13.0-alpine as build | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json .yarnrc.yml /app/ | ||
COPY .yarn /app/.yarn | ||
COPY packages/@uppy/companion /app/packages/@uppy/companion | ||
|
||
RUN apk --update add --virtual native-dep \ | ||
make gcc g++ python3 libgcc libstdc++ git && \ | ||
(cd /app && corepack yarn workspaces focus @uppy/companion) && \ | ||
apk del native-dep | ||
|
||
RUN cd /app && corepack yarn workspace @uppy/companion build | ||
|
||
# Now remove all non-prod dependencies for a leaner image | ||
RUN cd /app && corepack yarn workspaces focus @uppy/companion --production | ||
|
||
FROM node:16.13.0-alpine | ||
|
||
WORKDIR /app | ||
|
||
# copy required files from build stage. | ||
COPY --from=build /app/packages/@uppy/companion/bin /app/bin | ||
COPY --from=build /app/packages/@uppy/companion/lib /app/lib | ||
COPY --from=build /app/packages/@uppy/companion/package.json /app/package.json | ||
COPY --from=build /app/packages/@uppy/companion/node_modules /app/node_modules | ||
|
||
ENV PATH "${PATH}:/app/node_modules/.bin" | ||
|
||
CMD ["node","/app/bin/companion"] | ||
# This can be overruled later | ||
EXPOSE 3020 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -190,6 +190,7 @@ | |
] | ||
}, | ||
"resolutions": { | ||
"@types/redis": "2", | ||
"@types/eslint@^7.2.13": "^8.2.0", | ||
"[email protected]": "patch:npm-auth-to-token@npm:1.0.0#.yarn/patches/npm-auth-to-token-npm-1.0.0-c288ce201f" | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -114,5 +114,8 @@ | |
}, | ||
"engines": { | ||
"node": ">=10.20.1" | ||
}, | ||
"installConfig": { | ||
"hoistingLimits": "workspaces" | ||
} | ||
} |
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