-
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.
- Loading branch information
1 parent
d884592
commit 60f035a
Showing
8 changed files
with
75 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,12 @@ | ||
/node_modules | ||
Dockerfile | ||
.dockerignore | ||
.github | ||
.storybook | ||
LICENSE | ||
|
||
# Markdown files | ||
CHANGELOG.md | ||
README.md | ||
CONTRIBUTING.md | ||
|
Empty file.
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,42 @@ | ||
# Use the official Node.js image as the base image | ||
FROM node:16-alpine3.18 as development | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json . | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
# Stage 2 | ||
|
||
FROM node:16-alpine3.18 as production | ||
|
||
ARG APP_ENV=production | ||
|
||
ENV NODE_ENV=${APP_ENV} | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json . | ||
|
||
# RUN npm ci "Includes both dependencies & devDependencies" | ||
|
||
# If you still want to inclue devDependencies in production also | ||
# Use --include=dev flag | ||
# If you want to inclue only dependencies in production | ||
# Use --only=production flag | ||
|
||
RUN npm ci --include=dev | ||
|
||
COPY --from=development /usr/src/app/dist ./dist | ||
|
||
# Expose the port that the app will run on | ||
# EXPOSE 5000 | ||
|
||
# CMD [ "node" , "dist/index.js" ] | ||
|
||
|
Empty file.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Release" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
semantic-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "npm" | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Release a new version | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |