Skip to content

Commit

Permalink
Merge pull request #395 from TheMohit2003/docker
Browse files Browse the repository at this point in the history
dockerfile written for building docker image
  • Loading branch information
JulioManoel authored May 6, 2024
2 parents 3f5009d + ee9b1bb commit 6685ad3
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,39 @@ If you want to deply the fuction, change your account from spark to blaze, run:
Go to firebase panel -> functions -> on the right side of the function press "detailed usage statistics".
There you can get the url and replace on .env file.




## Docker Setup



### Building the Docker Image

To build the Docker image for UX Remote LAB, navigate to the project's root directory and run the following command:

```bash
docker build -t uxremotelab .
```

### Running the Application using Docker

After building the image, you can run the application in a Docker container using:


Note: Ensure you have created the .env file and filled it with all required variables before running the following command:


```bash
docker run -d --env-file .env -p 5000:5000 uxremotelab
```

Visit `http://localhost:5000` in your browser to access the UX Remote LAB platform.





## License

MIT © [UX Remote LAB](https://github.com/uramakilab/remote-usability-lab)
29 changes: 29 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:lts AS build-stage

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

# Run build as per the script defined in package.json
RUN npm run build

# Production stage using a minimal Node.js image
FROM node:alpine AS production-stage

# Install 'serve' to serve the application
RUN npm install -g serve

WORKDIR /app

# Copy the built application from the build stage
COPY --from=build-stage /app/dist /app

# Expose the port that 'serve' will run on
EXPOSE 5000

# Command to serve the application on port 5000
CMD ["serve", "-s", ".", "-l", "5000"]

0 comments on commit 6685ad3

Please sign in to comment.