Skip to content

Commit

Permalink
Merge pull request #504 from bounswe/feature/frontend_dockerise
Browse files Browse the repository at this point in the history
Dockerise frontend and add global readme file
  • Loading branch information
ilgazer authored Nov 28, 2023
2 parents ed1ae50 + 5353405 commit 13b6dc9
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<div align="center"><img src="https://user-images.githubusercontent.com/83069560/230832649-1788da25-6212-40a5-8eff-40955922ab59.png" alt="" width="150px" height="150px"><h1> CMPE352/451 Group 1 <br/> Disaster Response Platform </h1></div>

## Software
You can find the alpha version of our software in the `resq` subdirectory

***

## ⛑ About Us
Expand Down
48 changes: 48 additions & 0 deletions resq/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ResQ

ResQ is REST based web service for the Disaster Response Application ResQ developed by CMPE451-GroupA1

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

- Docker and Docker-Compose

### Config Directory Structure

The backend application gets the actual path from `resq.appdir` property and checks for **resq** directory under that path.

Under main directory structure is:
- **conf**
- **appparam.txt**: application configuration items are located under this file (web service url, username and pass etc.)
- **logConf.xml**: log configuration file.
- **log**: Application writes all logs under this directory

### Installing with Docker

First clone all files into local repo.

Place the config folder named as project_env under the directory bounswe2023group1\resq\backend\resq.
Then, run the following commands:

docker-compose up

## Project Specific Information

The local buld of the frontend application is available on http://localhost:3000

Production frontend URL: https://resq.org.tr


Backend application context root is /resq/api/v1/. You can reach the backend application via
https://localhost:8081/resq/api/v1/.
To reach the API documentation:
https://localhost:8081/resq/api/v1/swagger-ui.html


Production backend URL: https://api.resq.org.tr/resq/api/v1

Production backend API Documentation:
https://api.resq.org.tr/resq/api/v1/swagger-ui/index.html
10 changes: 10 additions & 0 deletions resq/backend/resq/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ services:
- POSTGRES_PASSWORD=compose-postgres
networks:
- app_network

frontend:
container_name: frontend
image: frontend:latest
build:
context: ../../frontend
ports:
- "3000:3000"
expose:
- "3000"

networks:
app_network:
11 changes: 11 additions & 0 deletions resq/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:18-alpine

WORKDIR /react/

COPY ./public/ /react/public
COPY ./src/ /react/src
COPY package.json /react/

RUN npm install

ENTRYPOINT npm start

0 comments on commit 13b6dc9

Please sign in to comment.