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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use an official Node.js runtime as the base image
FROM node:14

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json to the container
COPY package*.json ./

# Install project dependencies
RUN npm install

# Copy the rest of your application code to the container
COPY . .

# Build your Vite app (you can change the command if necessary)
RUN npm run build

# Expose the port your app will run on (adjust as needed)
EXPOSE 8080

# Command to start your application
CMD ["npm", "run", "preview"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@

It appears that the project you're trying to run uses Vite as its build tool and development server. Here are the steps to run the `fem-dictionary-web-app` project on your localhost:

METHOD 1. **USING DOCKER**
If Docker install in your machine run below command

```sh
docker run -p 8080:8080 aksamitsah/fem-dictionary-web-app
```

```sh
docker run -d -p 8080:8080 aksamitsah/fem-dictionary-web-app # RUN in Background
```

1. **Clone the Repository:**
If you haven't already, clone the repository as mentioned earlier:

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "fem-dictionary-web-app",
"version": "1.0.0",
"version": "1.0.1",
"description": "Front-end mentor dictionary web app",
"main": "index.js",
"scripts": {
"start": "vite",
"start": "vite --host 0.0.0.0",
"build": "vite build",
"preview": "vite preview --port 8080"
"preview": "vite preview --host 0.0.0.0 --port 8080"
},
"repository": {
"type": "git",
Expand Down