This commit is contained in:
Raphael Rouiller
2024-07-08 14:06:52 +02:00
commit aa54287126
96 changed files with 2718 additions and 0 deletions

31
chat/Dockerfile Normal file
View File

@ -0,0 +1,31 @@
FROM python:3.11-slim
# declaration of service variables environment
ENV CHAT_SERVICE_NAME=${CHAT_SERVICE_NAME}
ARG CHAT_SERVICE_NAME
# declaration of environment variables for python
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
COPY ./ChatApp /home/archive/${CHAT_SERVICE_NAME}
RUN apt-get update && apt-get install -y netcat-openbsd
RUN mkdir -p /home/archive
WORKDIR /home/archive
# installation of dependencies
COPY ./conf/requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt \
&& mkdir depedencies && mv requirements.txt depedencies
# copy and execute the initialization script
COPY ./tools/service_setup.sh /home/archive/service_setup.sh
RUN chmod +x /home/archive/service_setup.sh
# set the final working directory
WORKDIR /home/archive/${CHAT_SERVICE_NAME}
# Command for running the application
CMD ["bash", "/home/archive/service_setup.sh"]