Skip to content

Commit

Permalink
Added a Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fingerthief committed Mar 10, 2024
1 parent 150e175 commit 9d5b1fd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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 working directory
COPY package*.json ./

# Copy the rest of the application code to the working directory
COPY ./public .

# Install the app dependencies
RUN npm install

# Specify the port on which the app will run
EXPOSE 3000

# Define the command to start the app
CMD ["npm", "run", "start-server-docker"]
3 changes: 2 additions & 1 deletion js/app-view-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const messagesContainer = document.querySelector('.messages');
export function AppViewModel() {
const self = this;

// Startup assignments
//#region Startup assignments
self.userInput = ko.observable('');
self.isGeneratingImage = ko.observable(false);
self.userSearchInput = ko.observable('');
Expand Down Expand Up @@ -260,6 +260,7 @@ export function AppViewModel() {
self.showConversationOptions(false);
}
});
//#endregion

// Toggle sidebar
self.toggleSidebar = () => {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"start-server": "http-server ./ -p 8080 --cors",
"start-server-docker": "http-server . -p 3000 --cors",
"scss-build": "sass ./index.scss ./styles/site.css",
"build": "gulp",
"publish": "npm run scss-build && npm run build && firebase deploy",
Expand Down

0 comments on commit 9d5b1fd

Please sign in to comment.