Skip to content

Commit

Permalink
New Docker Image
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaBarbo committed Jul 12, 2024
1 parent 9193dd0 commit ee49121
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 138 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/Quality_Assessment_&_Awarding_v1.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Quality_Assessment_&_Awarding_v1

on:
push:
branches:
- sqa
pull_request:
branches:
- sqa

workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/Quality_Assessment_&_Awarding_v2.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Quality_Assessment_&_Awarding_v2

on:
push:
branches:
- sqa
pull_request:
branches:
- sqa
workflow_dispatch:

jobs:
QAA:
Expand Down
29 changes: 18 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
FROM python:3-alpine
FROM python:3.9-slim

WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
docker.io \
docker-compose

RUN python -m pip install --upgrade pip
# Work Directory
WORKDIR /app

COPY requirements.txt .
# Clean and clone updated GitHub repo
RUN rm -rf /app/* && \
git clone --branch sqa https://github.com/HPCI-Lab/yProv.git .

# Install requirements
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

COPY . .

ENV PORT=3000 SCHEME="bolt" ADDRESS='db:7687'

EXPOSE 3000

CMD [ "python" , "./app.py" ]
# Make the script_dockerfile.sh script executable and run it
COPY script_dockerfile.sh /app/script_dockerfile.sh
RUN chmod +x /app/script_dockerfile.sh
ENTRYPOINT ["/app/script_dockerfile.sh"]
24 changes: 0 additions & 24 deletions SQAaaS/Dockerfile

This file was deleted.

Binary file not shown.
Binary file not shown.
2 changes: 0 additions & 2 deletions SQAaaS/requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions SQAaaS/test_auth.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import requests
import test_documents

PATH = "http://localhost:3000/api/v0/auth"
#PATH = "http://localhost:3000/api/v0/auth"

# path to use to create a docker image
# PATH = "http://web:3000/api/v0/auth"
PATH = "http://web:3000/api/v0/auth"



Expand Down
4 changes: 2 additions & 2 deletions SQAaaS/test_documents.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import requests

PATH = "http://localhost:3000/api/v0/documents"
#PATH = "http://localhost:3000/api/v0/documents"

# path to use to create a docker image
#PATH = "http://web:3000/api/v0/documents"
PATH = "http://web:3000/api/v0/documents"


TOKEN = None
Expand Down
29 changes: 0 additions & 29 deletions deploy_service.sh

This file was deleted.

47 changes: 0 additions & 47 deletions docker-compose.yml

This file was deleted.

9 changes: 2 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
Flask==2.3.1
prov==2.0.0
prov2neo[dev]
py2neo==2021.2.4
PyJWT==2.8.0
bcrypt==4.1.2
passlib==1.7.4
pytest
requests
6 changes: 5 additions & 1 deletion SQAaaS/script_dockerfile.sh → script_dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ docker run \
--env PASSWORD=password \
hpci/yprov:latest

docker network connect yprov_net unittests
# Get the current container's hostname (which is the container's ID)
CONTAINER_ID=$(cat /etc/hostname)

# Connect the current container to the yprov_net network
docker network connect yprov_net "$CONTAINER_ID"

# Try to connect to Neo4j
echo "Connection to Neo4j"
Expand Down

0 comments on commit ee49121

Please sign in to comment.