Skip to content

Commit

Permalink
added Dockerfile and Docker-compose.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
VanshikaSabharwal committed Nov 10, 2024
1 parent a0ee511 commit 235d163
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
videos
images
data
.env
.git
.gitignore
.github
.dockerignore
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:20.10.0 AS build

WORKDIR /usr/src/app

COPY . .

RUN npm install -g typescript

RUN npm install

RUN npm run build

EXPOSE 4321

CMD ["npm", "run", "serve"]
5 changes: 3 additions & 2 deletions config/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export default defineConfig({
],
server: {
// this ensures that the browser opens upon server start
open: true,
// this sets a default port to 3000
open: false,
host: '0.0.0.0',
// this sets a default port to 4321
port: 4321,
},
});
11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
environment:
- REACT_APP_TALAWA_URL=${REACT_APP_TALAWA_URL}
# volumes:
# - .:/usr/src/app
ports:
- 4321:4321

0 comments on commit 235d163

Please sign in to comment.