Skip to content

Commit

Permalink
chore: additional file setup
Browse files Browse the repository at this point in the history
  • Loading branch information
snrakshith committed Jul 30, 2024
1 parent d884592 commit 60f035a
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
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 added CONTRIBUTING.md
Empty file.
42 changes: 42 additions & 0 deletions Dockerfile
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 added LICENSE
Empty file.
Empty file added SECURITY.md
Empty file.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions workflows/release.yml
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 }}"

0 comments on commit 60f035a

Please sign in to comment.