Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CommitCheck for poc

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
check-commit-message:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check commit message format
id: check-message
run: |
commit_message=$(git log -1 --pretty=%B)
if [[ ! $commit_message =~ ^chan-[a-zA-Z0-9\s\S]* ]]; then
echo "Commit message must start with 'V2FS-', but found: '$commit_message'"
exit 1
fi

- name: Continue workflow if check passes
if: ${{ failure() }}
run: echo "Workflow continues as check passed"
37 changes: 22 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
FROM node:16.17.0-alpine as builder

# Use the official Node.js 16 image
FROM node:16

# Set the working directory in the container
WORKDIR /app
COPY ./package.json .
COPY ./yarn.lock .
RUN yarn install

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the entire React app source code to the container
COPY . .
ARG TMDB_V3_API_KEY
ENV VITE_APP_TMDB_V3_API_KEY=${TMDB_V3_API_KEY}
ENV VITE_APP_API_ENDPOINT_URL="https://api.themoviedb.org/3"
RUN yarn build

FROM nginx:stable-alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /app/dist .
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]

# Build the React app
RUN npm run build

# Expose port 3000 (the port your Node.js app runs on)
EXPOSE 3000

# Start the Node.js app
CMD ["npm", "start"]
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.projectKey=netflix