- Improvements working with the cloud, minio, graylog and some first bugfixing

This commit is contained in:
Josako
2024-08-13 09:04:19 +02:00
parent 9caa423bcf
commit ab38dd7540
23 changed files with 414 additions and 220 deletions

View File

@@ -24,7 +24,7 @@ RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--shell "/bin/bash" \
--no-create-home \
--uid "${UID}" \
appuser
@@ -37,6 +37,9 @@ RUN apt-get update && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create logs directory and set permissions
RUN mkdir -p /app/logs && chown -R appuser:appuser /app/logs
# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.cache/pip to speed up subsequent builds.
# Leverage a bind mount to requirements.txt to avoid having to copy them into
@@ -45,9 +48,6 @@ RUN apt-get update && apt-get install -y \
COPY requirements.txt /app/
RUN python -m pip install -r /app/requirements.txt
# Switch to the non-privileged user to run the application.
USER appuser
# Copy the source code into the container.
COPY eveai_app /app/eveai_app
COPY common /app/common
@@ -56,8 +56,15 @@ COPY migrations /app/migrations
COPY scripts /app/scripts
COPY patched_packages /app/patched_packages
# Set permissions for entrypoint script
RUN chmod 777 /app/scripts/entrypoint.sh
# Set ownership of the application directory to the non-privileged user
RUN chown -R appuser:appuser /app
# Expose the port that the application listens on.
EXPOSE 5001
# Run the application.
#CMD ["sh", "-c", "/app/scripts/start_eveai_app.sh"]
# Set entrypoint and command
ENTRYPOINT ["/app/scripts/entrypoint.sh"]
CMD ["/app/scripts/start_eveai_app.sh"]