Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.env
.env.local
.env.development
.env.production
.env.test
.env.test.local
node_modules
dist
.vscode
.idea
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM node:22-alpine AS node

FROM node AS builder
ARG VITE_API_URL
WORKDIR /builder
ENV NODE_ENV=production
COPY . .

RUN npm install
RUN npm run build

FROM nginx:alpine AS runner
WORKDIR /app

# Create custom nginx.conf
RUN echo $'\
server {\n\
listen 80;\n\
location / {\n\
root /usr/share/nginx/html;\n\
index index.html;\n\
try_files $uri $uri/ /index.html;\n\
}\n\
}' > /etc/nginx/conf.d/default.conf

COPY --from=builder /builder/dist /usr/share/nginx/html
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Project Overview
This project is built using Vite and React.

This project is built using Vite and React.

# Deployed Radar Diagram

Expand All @@ -10,17 +11,47 @@ The radar is customizable. You can also add additional rings and divide the rada
The radar uses the [radar-diagram](https://www.npmjs.com/package/radar-diagram) library.

## Prerequisitions:
* nodejs v18

- nodejs v18

## Installation

1. To install all the necessary dependencies, run the following command:

`npm install`


## Running the Project

2. To start the development server, use the following command:

`npm run dev`

## Production setup

1. Build project image

via package.json script

```sh
npm run image:build
```

or directly running docker

```sh
docker build -t frontend-radar:latest .
```

2. Run the production image

via package.json script, runs on port 8080

```sh
npm run image:run
```

or directly running docker

```sh
docker run -p 8080:80 --rm frontend-radar:latest
```
Loading