Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
.env

# testing
/coverage
Expand All @@ -21,5 +22,3 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env
package-lock.json
File renamed without changes.
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM ubuntu:20.04

ARG APP_NAME

# test arg
RUN test -n "$APP_NAME"

# install system packages
RUN apt-get update -y
RUN apt-get install -y \
vim \
wget \
curl \
net-tools \
xz-utils

# install node
WORKDIR /opt
RUN wget https://nodejs.org/dist/v14.19.1/node-v14.19.1-linux-x64.tar.xz
RUN tar -xvf node-v14.19.1-linux-x64.tar.xz
ENV PATH="${PATH}:/opt/node-v14.19.1-linux-x64/bin"
# RUN ln -s /opt/node-v14.19.1-linux-x64/bin/node /usr/bin/
# RUn ln -s /opt/node-v14.19.1-linux-x64/bin/npm /usr/bin/

# setup user
RUN useradd -ms /bin/bash ubuntu
USER ubuntu

# install app
RUN mkdir -p /home/ubuntu/"$APP_NAME"/"$APP_NAME"
WORKDIR /home/ubuntu/"$APP_NAME"/"$APP_NAME"
COPY . .
RUN echo $PATH
RUN npm install

CMD ["npm", "start"]
4 changes: 0 additions & 4 deletions ENV.md

This file was deleted.

63 changes: 63 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
pipeline {
agent any

environment {
ENV_TYPE = "dev"
APP_NAME = "bottlecrm-app"
DOCKERHUB = credentials("dockerhub")
DOCKER_IMAGE_TAG = "build-${env.BUILD_NUMBER}-${env.GIT_COMMIT[0..7]}"
DOCKER_IMAGE = "ashwin31/bottlecrm_uix:${env.DOCKER_IMAGE_TAG}"
DOCKER_CONFIG = "config.json"
}

stages {
stage("build") {
steps {
sh "pwd; whoami; ls -al;"
sh "docker build --build-arg APP_NAME=$APP_NAME -t ${env.DOCKER_IMAGE} ."
}
}

stage("push") {
steps {
sh "echo '$DOCKERHUB_PSW' | docker login -u $DOCKERHUB_USR --password-stdin"
sh "docker push ${env.DOCKER_IMAGE}"
}
}

stage('trigger deploy') {
steps {
build job: 'deploy', parameters: [
string(
name: 'ENV_TYPE',
value: "${env.ENV_TYPE}"
),
string(
name: 'APP_NAME',
value: "${env.APP_NAME}"
),
string(
name: 'DOCKER_IMAGE',
value: "${env.DOCKER_IMAGE}"
)
]
}
}
}

post {
always {
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
dir("${env.WORKSPACE}@script") {
deleteDir()
}
dir("${env.WORKSPACE}@script@tmp") {
deleteDir()
}
sh 'docker rmi $(docker images -aq) || true'
}
}
}
53 changes: 47 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
# React CRM (bottlecrm.com)
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).


CRM UI developed in react for django-crm

[![RunCode](https://runcode-app-public.s3.amazonaws.com/images/dark_btn.png)](https://runcode.io)

### standards to follow
* two space indentation
* images should have img_ prefix
Loading