Skip to content

Commit

Permalink
ci: dockerize #122
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiShandy committed Sep 23, 2023
1 parent c0d4707 commit 2bb64fd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.next
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:18-alpine

WORKDIR /frontend

COPY package.json ./

COPY yarn.lock ./

RUN yarn install

COPY . .

RUN yarn build

EXPOSE 3000

CMD yarn start
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Documentation of the WiiQare Project

[![Deploy to AWS](https://github.com/WiiQare/frontend/actions/workflows/main.yml/badge.svg)](https://github.com/WiiQare/frontend/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/WiiQare/frontend/branch/main/graph/badge.svg?token=72SLV6EFSP)](https://codecov.io/gh/WiiQare/frontend)
[![Tests](https://github.com/WiiQare/frontend/actions/workflows/jest.js.yml/badge.svg)](https://github.com/WiiQare/frontend/actions/workflows/jest.js.yml)

Expand All @@ -25,35 +24,28 @@ To install and run this Next.js project locally, follow the steps below:
1. Clone the GitHub repository to your local machine using the following command:

```shell
git clone https://github.com/WiiQare/frontend.git "frontend-wiiQare"
git clone https://github.com/WiiQare/frontend.git
```

2. Navigate to the project directory :

```shell
cd frontend-wiiQare
cd frontend
```

3. Install dependencies using npm or yarn:
3. Build Docker image

```shell
npm install

or


yarn install
```sh
docker build -t frontend .
```

4. Configure necessary environment variables, such as API keys, base URLs, etc., in a `.env` file in the root of the project.

5. Launch the application in development mode:
4. Run Docker image

```shell
npm run dev
```sh
docker run -p 3000:3000 frontend
```

The application will be accessible at the following address : `http://localhost:3000`.
5. Open `http://localhost:3000` in your favorite browser

## Project structure

Expand Down

1 comment on commit 2bb64fd

@vercel
Copy link

@vercel vercel bot commented on 2bb64fd Sep 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wii-qare-fe – ./

wii-qare-fe.vercel.app
wii-qare-fe-wiiqare.vercel.app
wii-qare-fe-git-main-wiiqare.vercel.app

Please sign in to comment.