Skip to content

Commit

Permalink
Merge pull request #17 from pratiyushmishra7/master
Browse files Browse the repository at this point in the history
CTF Client v0.1
  • Loading branch information
arpit-saxena authored Jan 12, 2021
2 parents 4b310ab + 587f198 commit f3e66a5
Show file tree
Hide file tree
Showing 80 changed files with 6,369 additions and 2,366 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
src/serviceWorker.js
31 changes: 31 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"airbnb",
"prettier",
"prettier/react"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "prettier"],
"rules": {
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn" // Checks effect dependencies
}
}
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es6",
"tabWidth": 4,
"singleQuote": true
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"eslint.autoFixOnSave": true
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# build environment
FROM node:12.2.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json /app/package.json

# To handle 'not get uid/gid'
RUN npm config set unsafe-perm true

RUN npm install --silent
RUN npm install [email protected] -g --silent
COPY . /app
RUN npm run build

# production environment
FROM nginx:1.16.0-alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
28 changes: 28 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3.4'

services:
ctf_client:
build: .
image: "${REGISTRY_NAME}devclubiitd/ctf_client:0.1"
ports:
- ${PORT}:80
healthcheck:
test: ["CMD", "curl", "http://localhost"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
restart: "unless-stopped"
networks:
- "internal"
- "reverseproxy"
env_file:
- ./.env
environment:
- VIRTUAL_HOST

networks:
reverseproxy:
external:
name: "reverseproxy"
internal:
Loading

0 comments on commit f3e66a5

Please sign in to comment.