diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..d0adaf2671 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +node_modules +videos +images +data +.env +.git +.gitignore +.github +.dockerignore \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..fef086f72d --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/config/vite.config.ts b/config/vite.config.ts index 71ce6c6f47..28cd47ae5a 100644 --- a/config/vite.config.ts +++ b/config/vite.config.ts @@ -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, }, }); diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000..5936109b22 --- /dev/null +++ b/docker-compose.yaml @@ -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