forked from teamhanko/hanko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: edit the docker compose files to reflect the new folder str…
…ucture. only on docker container for elements and sdk needed.
- Loading branch information
1 parent
a37219a
commit 3169023
Showing
6 changed files
with
127 additions
and
39 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
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,31 @@ | ||
FROM node:16.16-alpine as build | ||
|
||
WORKDIR /app | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
|
||
# frontend-sdk | ||
COPY frontend-sdk/package.json frontend-sdk/ | ||
COPY frontend-sdk/package-lock.json frontend-sdk/ | ||
|
||
WORKDIR /app/frontend-sdk | ||
RUN npm ci --silent | ||
COPY frontend-sdk/ ./ | ||
RUN npm run build | ||
|
||
|
||
# elements | ||
WORKDIR /app/elements | ||
COPY elements/package.json ./ | ||
COPY elements/package-lock.json ./ | ||
|
||
RUN npm ci | ||
COPY ./elements ./ | ||
RUN npm run build | ||
|
||
FROM nginx:stable-alpine | ||
COPY --from=build /app/elements/dist/element.hanko-auth.js /usr/share/nginx/html | ||
COPY --from=build /app/frontend-sdk/dist/sdk.* /usr/share/nginx/html | ||
|
||
COPY elements/nginx/default.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
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,31 @@ | ||
FROM node:16.16-alpine as build | ||
|
||
WORKDIR /app | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
|
||
# frontend-sdk | ||
COPY frontend-sdk/package.json frontend-sdk/ | ||
COPY frontend-sdk/package-lock.json frontend-sdk/ | ||
|
||
WORKDIR /app/frontend-sdk | ||
RUN npm ci --silent | ||
COPY frontend-sdk/ ./ | ||
RUN npm run build | ||
|
||
|
||
# elements | ||
WORKDIR /app/elements | ||
COPY elements/package.json ./ | ||
COPY elements/package-lock.json ./ | ||
|
||
RUN npm ci | ||
COPY ./elements ./ | ||
RUN npm run build:dev | ||
|
||
FROM nginx:stable-alpine | ||
COPY --from=build /app/elements/dist/element.hanko-auth.js /usr/share/nginx/html | ||
COPY --from=build /app/frontend-sdk/dist/sdk.* /usr/share/nginx/html | ||
|
||
COPY elements/nginx/default.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.