Skip to content
Draft
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
15 changes: 15 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.10.8-alpine

ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV LD_LIBRARY_PATH=instantclient_12_8
RUN apk add --no-cache gcc musl-dev linux-headers

RUN pip install -r requirements.txt

RUN wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
RUN unzip instantclient-basiclite-linuxx64.zip
RUN rm -f instantclient-basiclite-linuxx64.zip
RUN cd instantclient_21_8
RUN rm -f *jdbc* *occi* *mysql* *jar uidrvci genezi adrci
RUN ld
21 changes: 18 additions & 3 deletions backend/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,26 @@ services:
ports:
- "1521:1521"
volumes:
- desktop_oracle-volume:/opt/oracle/oradata
- desktop_oracle-volume:/opt/oracle/oradata
environment:
- ORACLE_SID:ORCLCDB
- ORACLE_PWD:password


flask:
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
volumes:
- flask-volume:/opt/flask/flaskdata
depends_on:
oracle:
condition: service_started
command: ["python", "controllers/app.py"]

volumes:
desktop_oracle-volume:
external: true
external: true
flask-volume:
external: true
4 changes: 2 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cx-Oracle=8.3.0
cx-Oracle==8.3.0
Flask~=2.2.2
Flask-Cors=3.0.10
Flask-Cors==3.0.10
4 changes: 2 additions & 2 deletions backend/utils/oracleUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
user = 'FRUIT'
password = 'FRUIT'
dns = 'localhost:1521/ORCLCDB'
lib_dir = 'C:\\Users\\ranie\\Desktop\\workspace\\database_system\\resources\\instantclient-basic-windows\\instantclient_21_7'
lib_dir = 'instantclient_21_7'


def get_db_connection():

cx_Oracle.init_oracle_client(lib_dir=lib_dir)
#cx_Oracle.init_oracle_client(lib_dir=lib_dir)
pool = cx_Oracle.SessionPool(user=user, password=password,
dsn=dns, min=2,
max=5, increment=1, encoding="UTF-8")
Expand Down
4 changes: 4 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.git
.gitignore
dist
8 changes: 8 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:19.1.0-alpine
WORKDIR '/app'

COPY package.json .
RUN npm install
COPY . .
EXPOSE 4200
CMD ["npm", "start"]
11 changes: 11 additions & 0 deletions frontend/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "4200:4200"
volumes:
- /fronted/node_modules
- .:/fronted
11 changes: 6 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "frontend",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"ng": "ng",
"start": "npx ng serve --host 0.0.0.0 --poll=500",
"build": "npx ng build --prod demo",
"test": "npx ng test --browsers=ChromeHeadless",
"lint": "npx ng lint",
"e2e": "npx ng e2e"
},
"private": true,
"dependencies": {
Expand Down