-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from mpast/bug-fix-dd-export-issue-73
chore: improve error management in defect dojo export
- Loading branch information
Showing
10 changed files
with
89 additions
and
80 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,13 +1,11 @@ | ||
# Ignore the logs | ||
app/logs/ | ||
rabbitmq/logs/ | ||
# Ignore rabbitmq and nginx | ||
rabbitmq | ||
nginx | ||
|
||
# Ignore apk directory | ||
app/media/apk | ||
|
||
# Ignoring git folders | ||
.git | ||
|
||
# Ignore certificates | ||
nginx/ssl/nginx.crt | ||
nginx/ssl/nginx.key | ||
.git |
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,7 +1,9 @@ | ||
*.DS_Store | ||
.env | ||
.vscode | ||
app/logs/* | ||
rabbitmq/logs/* | ||
nginx/logs/* | ||
app/media/* | ||
*.sqlite3 | ||
*.sqlite | ||
|
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,69 +1,69 @@ | ||
FROM python:3.9.7-buster@sha256:79a631c93960c5919f27f3403e734ec19b130008370a5f902141bcff2e6d6f4c | ||
# Update and package installation | ||
RUN apt-get update && \ | ||
apt-get clean && \ | ||
apt-get install -y ca-certificates-java --no-install-recommends && \ | ||
apt-get clean | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y openjdk-11-jdk p11-kit wkhtmltopdf libqt5gui5 && \ | ||
apt-get install -y && \ | ||
apt-get clean && \ | ||
update-ca-certificates -f | ||
|
||
# Get JADX Tool | ||
ENV JADX_VERSION 1.4.5 | ||
|
||
RUN \ | ||
wget "https://github.com/skylot/jadx/releases/download/v$JADX_VERSION/jadx-$JADX_VERSION.zip" && \ | ||
unzip "jadx-$JADX_VERSION.zip" | ||
|
||
# Create user | ||
ARG uid=1000 | ||
ARG gid=1000 | ||
ARG user=app | ||
ARG group=app | ||
|
||
RUN groupadd -g ${gid} ${group} \ | ||
&& useradd -u ${uid} -g ${group} -s /bin/sh ${user} | ||
|
||
# Copy entrypoints | ||
COPY entrypoint/web_entrypoint.sh \ | ||
entrypoint/worker_entrypoint.sh / | ||
|
||
RUN chown ${uid}:${gid} /web_entrypoint.sh /worker_entrypoint.sh && \ | ||
chmod u+x /web_entrypoint.sh /worker_entrypoint.sh | ||
|
||
# Create a directory in the container in /app | ||
RUN mkdir /app | ||
# Copy all to /app directory | ||
COPY . /app | ||
|
||
# Use /app as the workdir | ||
WORKDIR /app | ||
|
||
|
||
# Upgrade pip and install python dependencies | ||
RUN pip install --upgrade pip \ | ||
&& pip install -r requirements.txt | ||
|
||
# Encoding configuration | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV PYTHONIOENCODING utf8 | ||
|
||
# Logs | ||
RUN mkdir -p app/logs | ||
RUN touch app/logs/debug.log | ||
|
||
# RabbitMQ directory | ||
RUN mkdir -p rabbitmq/logs | ||
|
||
# Set the permissions to the user | ||
RUN chown -R ${uid}:${gid} /app | ||
|
||
# Run the container as non-root user | ||
USER ${uid} | ||
|
||
# Expose the 8000 port | ||
EXPOSE 8000 | ||
FROM python:3.9.7-buster@sha256:79a631c93960c5919f27f3403e734ec19b130008370a5f902141bcff2e6d6f4c | ||
# Update and package installation | ||
RUN apt-get update && \ | ||
apt-get clean && \ | ||
apt-get install -y ca-certificates-java --no-install-recommends && \ | ||
apt-get clean | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y openjdk-11-jdk p11-kit wkhtmltopdf libqt5gui5 && \ | ||
apt-get install -y && \ | ||
apt-get clean && \ | ||
update-ca-certificates -f | ||
|
||
# Get JADX Tool | ||
ENV JADX_VERSION 1.4.5 | ||
|
||
RUN \ | ||
wget "https://github.com/skylot/jadx/releases/download/v$JADX_VERSION/jadx-$JADX_VERSION.zip" && \ | ||
unzip "jadx-$JADX_VERSION.zip" | ||
|
||
# Create user | ||
ARG uid=1000 | ||
ARG gid=1000 | ||
ARG user=app | ||
ARG group=app | ||
|
||
RUN groupadd -g ${gid} ${group} \ | ||
&& useradd -u ${uid} -g ${group} -s /bin/sh ${user} | ||
|
||
# Copy entrypoints | ||
COPY entrypoint/web_entrypoint.sh \ | ||
entrypoint/worker_entrypoint.sh / | ||
|
||
RUN chown ${uid}:${gid} /web_entrypoint.sh /worker_entrypoint.sh && \ | ||
chmod u+x /web_entrypoint.sh /worker_entrypoint.sh | ||
|
||
# Create a directory in the container in /app | ||
RUN mkdir /app | ||
# Copy all to /app directory | ||
COPY . /app | ||
|
||
# Use /app as the workdir | ||
WORKDIR /app | ||
|
||
|
||
# Upgrade pip and install python dependencies | ||
RUN pip install --upgrade pip \ | ||
&& pip install -r requirements.txt | ||
|
||
# Encoding configuration | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV PYTHONIOENCODING utf8 | ||
|
||
# Logs | ||
RUN mkdir -p app/logs | ||
RUN touch app/logs/debug.log | ||
|
||
# RabbitMQ directory | ||
RUN mkdir -p rabbitmq/logs | ||
|
||
# Set the permissions to the user | ||
RUN chown -R ${uid}:${gid} /app | ||
|
||
# Run the container as non-root user | ||
USER ${uid} | ||
|
||
# Expose the 8000 port | ||
EXPOSE 8000 |
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
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
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
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
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
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
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