-
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.
feat: add basic Docker image & CD job
- Loading branch information
Showing
3 changed files
with
44 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Use the NodeJS image as builder | ||
FROM node:lts AS builder | ||
|
||
# Create the workspace | ||
WORKDIR /usr/src/app | ||
|
||
# Copy over the package, and install the dependencies | ||
COPY package.json . | ||
RUN yarn | ||
|
||
# Copy over the other files. | ||
COPY components ./components | ||
COPY layouts ./layouts | ||
COPY pages ./pages | ||
COPY public ./public | ||
COPY server ./public | ||
COPY app.vue . | ||
COPY nuxt.config.ts . | ||
COPY tsconfig.json . | ||
|
||
# Build the application | ||
RUN yarn build | ||
|
||
# The actual server, this builds the final image | ||
FROM node:lts | ||
|
||
# Create the workspace | ||
WORKDIR /usr/src/app | ||
|
||
# Copy the output of the builder | ||
COPY --from=builder /usr/src/app/.output ./.output | ||
|
||
# Start | ||
ENV HOST 0.0.0.0 | ||
ENV PORT 80 | ||
EXPOSE 80 | ||
CMD node .output/server/index.mjs |
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