Skip to content

Commit

Permalink
fixing files
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaBarbo committed Jul 25, 2024
1 parent db159d9 commit c951972
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 26 deletions.
32 changes: 8 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
FROM python:3.9-slim
FROM python:3-alpine

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

# Work Directory
WORKDIR /app

# 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
RUN python -m pip install --upgrade pip

# Installa le dipendenze
RUN pip install requests
RUN pip install pytest
COPY requirements.txt .

# 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
RUN pip install -r requirements.txt

# Default command to keep the container running
CMD ["tail", "-f", "/dev/null"]
COPY . .

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

EXPOSE 3000

CMD [ "python" , "./app.py" ]
33 changes: 33 additions & 0 deletions SQAaaS/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM python:3.9-slim

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

# Work Directory
WORKDIR /app

# 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

# Installa le dipendenze
RUN pip install requests
RUN pip install pytest

# 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

# Default command to keep the container running
CMD ["tail", "-f", "/dev/null"]



2 changes: 2 additions & 0 deletions SQAaaS/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest
requests
File renamed without changes.
29 changes: 29 additions & 0 deletions deploy_service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

docker run \
--name db \
--network=yprov_net \
-p 7474:7474 -p 7687:7687 \
-d \
-v neo4j_data:/data \
-v neo4j_logs:/logs \
-v $HOME/neo4j/import:/var/lib/neo4j/import \
-v $HOME/neo4j/plugins:/plugins \
--env NEO4J_AUTH=neo4j/password \
--env NEO4J_ACCEPT_LICENSE_AGREEMENT=eval \
-e NEO4J_apoc_export_file_enabled=true \
-e NEO4J_apoc_import_file_enabled=true \
-e NEO4J_apoc_import_file_use__neo4j__config=true \
-e NEO4J_PLUGINS=\[\"apoc\"\] \
neo4j:enterprise

docker run \
--restart on-failure \
--name web \
--network=yprov_net \
-p 3000:3000 \
-d \
-v yprov_data:/app/conf \
--env USER=neo4j \
--env PASSWORD=password \
yprov_web
47 changes: 47 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: "3"
services:
web:
build: .
restart: on-failure
depends_on:
- db
links:
- db
networks:
- yprov_net
ports:
- "3000:3000"
environment:
USER: neo4j
PASSWORD: password
ADDRESS: db:7687
volumes:
- yprov_data:/app/conf

db:
image: "neo4j:enterprise"
ports:
- "7474:7474"
- "7687:7687"
environment:
NEO4J_AUTH: neo4j/password
NEO4J_ACCEPT_LICENSE_AGREEMENT: eval
NEO4J_PLUGINS: '["graph-data-science"]'
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
networks:
- yprov_net
healthcheck:
test: ["CMD", "curl", "-f", "http://db:7474"]
interval: 30s
timeout: 10s
retries: 5

volumes:
neo4j_data:
neo4j_logs:
yprov_data:

networks:
yprov_net:
9 changes: 7 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
pytest
requests
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

0 comments on commit c951972

Please sign in to comment.