Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Docker Support to Talawa Admin, Fixes #1075 #1726

Closed
wants to merge 10 commits into from
35 changes: 35 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# files that interfere with YARN
yarn.lock
pnpm-lock.yaml

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
coverage/
codecov

# production
/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# express setup
debug.log

# No editor related files
.idea
.vscode
*.swp
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Contains the PDF file of the Tag as JSON string, thus does not need to be linted
src/components/CheckIn/tagTemplate.ts
src/components/CheckIn/tagTemplate.ts
Dockerfile*
docker-compose*.yml
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this step required?

vasujain275 marked this conversation as resolved.
Show resolved Hide resolved

RUN npm install
vasujain275 marked this conversation as resolved.
Show resolved Hide resolved

RUN npm run build
vasujain275 marked this conversation as resolved.
Show resolved Hide resolved

EXPOSE 4321

CMD ["npm", "run", "serve"]
11 changes: 11 additions & 0 deletions docker-compose.yml
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
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@pdfme/generator": "^1.2.6",
"bootstrap": "^5.3.0",
"customize-cra": "^1.0.0",
"dotenv": "^16.3.1",
"dayjs": "^1.11.11",
"flag-icons": "^6.6.6",
"graphql": "^16.8.2",
Expand All @@ -31,7 +32,7 @@
"i18next": "^21.8.14",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^1.4.1",
"inquirer": "^8.0.0",
vasujain275 marked this conversation as resolved.
Show resolved Hide resolved
"inquirer": "^8.2.6",
"js-cookie": "^3.0.1",
"markdown-toc": "^1.2.0",
"prettier": "^3.2.5",
Expand Down Expand Up @@ -70,7 +71,8 @@
"update:toc": "node scripts/githooks/update-toc.js",
"lint-staged": "lint-staged --concurrent false",
"setup": "tsx setup.ts",
"check-localstorage": "node scripts/githooks/check-localstorage-usage.js"
"check-localstorage": "node scripts/githooks/check-localstorage-usage.js",
"dx-prod": "docker compose -f docker-compose.yml up -d --build"
},
"eslintConfig": {
"extends": [
Expand Down
Loading