# Base image FROM python:3.10 # Set the working directory USER root WORKDIR /app # Install NGINX RUN apt-get update && apt-get install -y nginx RUN mkdir -p /var/cache/nginx \ /var/log/nginx \ /var/lib/nginx RUN touch /var/run/nginx.pid RUN chown -R 777 /var/cache/nginx \ /var/log/nginx \ /var/lib/nginx \ /var/run/nginx.pid # Copy nginx configuration COPY nginx.conf /etc/nginx/sites-available/default # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the source code COPY ./rasa-assistant/* . COPY entrypoint.sh . COPY ./rasa-assistant/.config /.config RUN chmod -R 777 /etc/nginx/sites-available/default RUN mkdir models && mkdir .rasa && mkdir tests RUN chmod -R 777 . RUN chown -R 777 /var/lib/nginx RUN chown -R 777 /.config # Set the permissions for the entrypoint.sh script RUN chmod +x entrypoint.sh # Expose ports EXPOSE 80 7860 5055 RUN rasa train --data ./data --config ./config.yml # Set the entrypoint script ENTRYPOINT ["/app/entrypoint.sh"]