-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db159d9
commit c951972
Showing
7 changed files
with
126 additions
and
26 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,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" ] |
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,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"] | ||
|
||
|
||
|
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,2 @@ | ||
pytest | ||
requests |
File renamed without 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,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 |
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,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: |
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,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 |