-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve docker compose setup, mount config so not required in build
- Loading branch information
1 parent
4a37894
commit 586fe5d
Showing
8 changed files
with
42 additions
and
21 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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
FROM node:16-alpine | ||
WORKDIR /app | ||
COPY config.js /config.js | ||
COPY api/ . | ||
WORKDIR /sqtracker/app | ||
COPY . . | ||
RUN yarn | ||
EXPOSE 44444 | ||
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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
**/node_modules/ | ||
**/node_modules/ | ||
.next |
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
FROM node:16-alpine AS builder | ||
WORKDIR /app | ||
COPY config.js /config.js | ||
COPY client/ . | ||
WORKDIR /sqtracker | ||
COPY . . | ||
RUN yarn install | ||
RUN echo "{}" > /config.js | ||
RUN ./node_modules/.bin/next build | ||
|
||
FROM node:16-alpine | ||
WORKDIR /app | ||
COPY --from=builder /config.js /config.js | ||
COPY --from=builder /app/node_modules ./node_modules | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/.next ./.next | ||
COPY --from=builder /app/next.config.js ./next.config.js | ||
WORKDIR /sqtracker/client | ||
COPY --from=builder /sqtracker/node_modules ./node_modules | ||
COPY --from=builder /sqtracker/public ./public | ||
COPY --from=builder /sqtracker/.next ./.next | ||
COPY --from=builder /sqtracker/next.config.js ./next.config.js | ||
EXPOSE 44445 | ||
CMD ["node_modules/.bin/next", "start", "-p", "44445"] |
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