Skip to content

Commit

Permalink
Docker file is added (Opentek-Org#435)
Browse files Browse the repository at this point in the history
* DOcker file is added

* Readme is updated
  • Loading branch information
shraddha761 authored Jul 11, 2023
1 parent 681bef8 commit 62765b8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Use a base image with the desired environment
FROM nginx:latest

# Set the working directory in the container
WORKDIR /usr/share/nginx/html

# Copy the HTML file and any other static assets to the container
COPY index.html .
COPY static /usr/share/nginx/html/static

# Expose the desired port
EXPOSE 80

# Start the nginx server when the container starts
CMD ["nginx", "-g", "daemon off;"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ git checkout -b <your_branch_name>

**You are all set! Open [localhost:3000](http://localhost:3000/) to see the app.** (Authenticated via Auth0)

## Docker Setup

Opentek provides a Docker setup that allows you to run the application in a containerized environment. To use Docker with Opentek, follow these steps:

Make sure you have Docker installed on your machine. If not, you can download and install Docker from the official website: [Docker](https://www.docker.com/get-started)
Build the Docker image using the provided Dockerfile by running the following command:

```bash
docker build -t opentek .

Once the Docker image is built, you can run a container using the following command:
docker run -p 3000:3000 opentek.
Open your web browser and visit http://localhost:3000 to access the Opentek application running inside the Docker container.

If you are using **VS Code**, you can use the [live server](https://www.freecodecamp.org/news/vscode-live-server-auto-refresh-browser/) extension to set up your local environment. Make sure to keep your Port number as [**3000**](https://stackoverflow.com/questions/55429643/where-to-set-value-of-liveserver-settings-port-in-live-server-extension-of-visua). This is required in order to use the authentication feature via Auth0 in your local env, for which the allowed port is set to 3000 as of now .More common ports will be added ASAP.

8. Perfom your desired changes to the code base.
Expand Down

0 comments on commit 62765b8

Please sign in to comment.