-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes, enhancements and dockerizing the project
- Loading branch information
Showing
79 changed files
with
9,272 additions
and
6,967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,4 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
README.md | ||
.git | ||
node_modules | ||
backend/node_modules | ||
logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Set to true to add reviewers to pull requests | ||
addReviewers: true | ||
|
||
# Set to true to add assignees to pull requests | ||
addAssignees: false | ||
|
||
# A list of reviewers to be added to pull requests (GitHub user name) | ||
reviewers: | ||
- zacharyrobin | ||
- KeeyanGhoreshi | ||
- smalho01 | ||
|
||
# A number of reviewers added to the pull request, Set to 0 to add all reviewers | ||
numberOfReviewers: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Sync Fork | ||
|
||
on: | ||
schedule: | ||
- cron: '30 14 * * 1' # every Monday at 14:30 UCT | ||
workflow_dispatch: # on button click for manual testing | ||
|
||
jobs: | ||
sync: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: tgymnich/[email protected] #1.4 is stable but may need to be updated | ||
with: | ||
owner: LalanaChami | ||
base: master # Upstream | ||
head: master # local | ||
ignore_fail: true | ||
auto_merge: false | ||
pr_title: Fork Auto Sync | ||
pr_message: Upstream repository has been updated - Please review changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Base Image CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
docker-base-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test Server Docker image Builds | ||
run: docker build -f Dockerfile.base . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Docker Image CD | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker-cd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build and push Base Node Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: Dockerfile.base | ||
push: true | ||
tags: codexrems/node14-pkg-config:REMSvCurrent | ||
|
||
- name: Build and push Server Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: codexrems/pharmacy-information-system:REMSvCurrent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
docker-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test Server Docker image Builds | ||
run: docker build . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,48 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Docker Node.js Launch", | ||
"type": "docker", | ||
"name": "Debug Pharmacy-Information-System Backend (Docker)", | ||
"port": 3011, | ||
"request": "attach", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"type": "node", | ||
"localRoot": "${workspaceFolder}", | ||
"remoteRoot": "/home/node/app/pharmacy-information-system", | ||
"restart": true | ||
}, | ||
{ | ||
"name": "Debug Pharmacy-Information-System Backend (Local)", | ||
"port": 3011, | ||
"request": "attach", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"type": "node", | ||
"restart": true | ||
}, | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"preLaunchTask": "docker-run: debug", | ||
"platform": "node" | ||
"name": "Debug Pharmacy-Information-System Frontend (Launch Local + Docker)", | ||
"url": "http://localhost:4200", | ||
"webRoot": "${workspaceFolder}", | ||
"runtimeArgs": [ | ||
"--remote-debugging-port=9222" | ||
] | ||
}, | ||
{ | ||
"type": "chrome", | ||
"request": "attach", // Launch Chrome According To: https://github.com/microsoft/vscode-chrome-debug#attach | ||
"name": "Debug Pharmacy-Information-System Frontend (Attach Local + Docker)", | ||
"url": "http://localhost:4200/*", | ||
"port": 9222, | ||
"webRoot": "${workspaceFolder}", | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
FROM node:12.18-alpine | ||
ENV NODE_ENV production | ||
WORKDIR /usr/src/app | ||
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] | ||
RUN npm install --production --silent && mv node_modules ../ | ||
COPY . . | ||
EXPOSE 8080 | ||
CMD npm start | ||
FROM codexrems/node14-pkg-config:REMSvCurrent | ||
WORKDIR /home/node/app/pharmacy-information-system | ||
COPY --chown=node:node . . | ||
RUN npm install | ||
WORKDIR /home/node/app/pharmacy-information-system/backend | ||
RUN npm install | ||
WORKDIR /home/node/app/pharmacy-information-system | ||
EXPOSE 3010 | ||
EXPOSE 4200 | ||
CMD node backend/populatedb.js && npm run start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM node:14 | ||
RUN \ | ||
apt-get update -y && \ | ||
apt-get install xserver-xorg-dev libxi-dev libxext-dev -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM codexrems/node14-pkg-config:latest | ||
WORKDIR /home/node/app/pharmacy-information-system | ||
COPY --chown=node:node . . | ||
RUN npm install | ||
WORKDIR /home/node/app/pharmacy-information-system/backend | ||
RUN npm install | ||
WORKDIR /home/node/app/pharmacy-information-system | ||
EXPOSE 3010 | ||
EXPOSE 4200 | ||
EXPOSE 3011 | ||
CMD ./dockerRunnerDev.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,8 @@ Star :star: the repo to help the developers :innocent: | |
|
||
<table> | ||
<tr> | ||
<td>Doctor Oders</td> | ||
<td>Verified Doctor Oders</td> | ||
<td>Doctor Orders</td> | ||
<td>Verified Doctor Orders</td> | ||
</tr> | ||
<tr> | ||
|
@@ -109,14 +109,15 @@ Star :star: the repo to help the developers :innocent: | |
3) cd (change directory) in to the project folder | ||
4) Run `npm install` in your terminal | ||
5) Run `ng serve` to run the Angular frontend | ||
6) Run `npm run start:server` to run the backend Node server | ||
7) Open your browser and navigate to `http://localhost:4200/` | ||
6) Start backend database using docker. Run `docker run --name rems_local_pharmacy-information-system-database --expose 27017 -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME='pharmacy-information-root' -e MONGO_INITDB_ROOT_PASSWORD='pharmacy-information-password' -v rems_local_pharmacy-infomation-system-database:/data/db mongo` | ||
7) Run `npm run start:server` to run the backend Node server | ||
8) Open your browser and navigate to `http://localhost:4200/` | ||
|
||
|
||
## 🚨 Development server | ||
|
||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
Run `npm run start:serve` for a backend server. Navigate to `http://localhost:3000/`. | ||
Run `npm run start:serve` for a backend server. Navigate to `http://localhost:3010/`. | ||
|
||
## 🚨 Code scaffolding | ||
|
||
|
@@ -133,7 +134,3 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. | |
## 🚨 Running end-to-end tests | ||
|
||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). | ||
|
||
## 🚨 Further help | ||
|
||
To get more help on this please email "[email protected]" or feel free to open a issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,26 +9,27 @@ const inventoryRoutes = require('./routes/inventory'); | |
const userRoutes = require('./routes/user'); | ||
const salesRoutes = require('./routes/sales'); | ||
const doctorUserRoutes = require('./routes/doctorUser'); | ||
const doctorOderRoutes = require('./routes/doctorOders'); | ||
const verifiedDoctorOderRoutes = require('./routes/verifiedDoctorOder'); | ||
const pickedUpOdersRoutes = require('./routes/pickedUpOders'); | ||
const doctorOrderRoutes = require('./routes/doctorOrders'); | ||
// const verifiedDoctorOrderRoutes = require('./routes/verifiedDoctorOrder'); | ||
// const pickedUpOrdersRoutes = require('./routes/pickedUpOrders'); | ||
|
||
|
||
|
||
mongoose.connect('mongodb+srv://lalana:[email protected]/pharmacy?retryWrites=true&w=majority',{useNewUrlParser: true , useUnifiedTopology: true}) | ||
const mongoConnString = process.env.MONGODB_CONNSTRING ? process.env.MONGODB_CONNSTRING : 'mongodb://pharmacy-information-root:pharmacy-information-password@localhost:27017?retryWrites=true&w=majority'; | ||
mongoose.connect(mongoConnString, {useNewUrlParser: true , useUnifiedTopology: true}) | ||
.then(()=>{ | ||
console.log('connected to database!'); | ||
}) | ||
.catch(()=>{ | ||
.catch((e)=>{ | ||
console.log(e); | ||
console.log('connection failed! '); | ||
}); | ||
}); | ||
mongoose.set('useCreateIndex', true); | ||
|
||
//OJx2X4IllVNl9up4 | ||
|
||
|
||
app.use(bodyParser.json()); | ||
app.use(bodyParser.urlencoded({ extended: false })); | ||
app.use(bodyParser.json({limit: '50mb'})); | ||
app.use(bodyParser.urlencoded({ extended: false, limit: '50mb' })); | ||
app.use("/images" , express.static(path.join("images"))); | ||
|
||
|
||
|
@@ -113,8 +114,8 @@ app.use("/api/inventory",inventoryRoutes); | |
app.use("/api/user",userRoutes); | ||
app.use("/api/sales",salesRoutes); | ||
app.use("/api/doctorUser",doctorUserRoutes); | ||
app.use("/api/doctorOder",doctorOderRoutes); | ||
app.use("/api/verifiedDoctorOder",verifiedDoctorOderRoutes); | ||
app.use("/api/pickedUpOders",pickedUpOdersRoutes); | ||
app.use("/api/doctorOrder",doctorOrderRoutes); | ||
// app.use("/api/verifiedDoctorOrder",verifiedDoctorOrderRoutes); | ||
// app.use("/api/pickedUpOrders",pickedUpOrdersRoutes); | ||
|
||
module.exports = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.