Commit 33081e26 authored by Artem Baranovskyi's avatar Artem Baranovskyi
Browse files

Dummy API is bind to http://127.0.0.1:5000/api/data

-----------------------------------------------------------
TODO: Create an API to use script run_LR_SBERT.py on http://127.0.0.1:5000/api/data or like that. Configure relative paths at ASYST script (run_LR_SBERT.py).
parent c1481f72
......@@ -17,7 +17,7 @@ ENV MOODLE_BASE_DIR_DATA ${MOODLE_BASE_DIR_DATA}
# Installing necessary packages
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y apache2 php libapache2-mod-php php-mysqli php-mysql php-xml php-pdo php-pdo-mysql mariadb-client mariadb-server wget unzip p7zip-full python3 python3-pip iputils-ping php-mbstring graphviz aspell ghostscript clamav php8.2-pspell php8.2-curl php8.2-gd php8.2-intl php8.2-mysql php8.2-xml php8.2-xmlrpc php8.2-ldap php8.2-zip php8.2-soap php8.2-mbstring openssl git && \
apt-get install -y apache2 php libapache2-mod-php php-mysqli php-mysql php-xml php-pdo php-pdo-mysql mariadb-client mariadb-server wget unzip p7zip-full python3 python3-pip iputils-ping php-mbstring graphviz aspell ghostscript clamav php8.2-pspell php8.2-curl php8.2-gd php8.2-intl php8.2-mysql php8.2-xml php8.2-xmlrpc php8.2-ldap php8.2-zip php8.2-soap php8.2-mbstring openssl git nano supervisor && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Setting necessary php params
......@@ -153,3 +153,9 @@ EXPOSE 80 443 5000
# Run the Flask app (modify entrypoint or use a custom script if needed)
#CMD ["bash", "-c", "service apache2 start && source /opt/myenv/bin/activate && python3 /var/www/html/moodle/install_moodle.sh /var/www/html/moodle/api.py "]
#CMD ["bash", "-c", "service apache2 start && source /opt/myenv/bin/activate && python3 /var/www/html/moodle/api.py && /var/www/html/moodle/install_moodle.sh"]
# Setting up supervisord
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Running supervisord
CMD ["/usr/bin/supervisord"]
\ No newline at end of file
[supervisord]
nodaemon=true
[program:apache2]
command=/usr/sbin/apache2ctl -D FOREGROUND
autostart=true
autorestart=true
[program:flask]
command=/opt/myenv/bin/python /var/www/html/moodle/api.py
directory=/var/www/html/moodle
autostart=true
autorestart=true
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment