Commit 1f8b7a01 authored by Romain Loth's avatar Romain Loth

fix flask_iscpif_regcomex/Dockerfile and other minor docker modifications

parent 996ad363
** Docker commands for advanced testing **
```
# check ports redirection
docker inspect comex_flask_test | jq '.[0].NetworkSettings'
docker exec -it comex_flask_test bash
docker inspect comex_test | jq '.[0].NetworkSettings'
docker exec -it comex_test bash
```
......@@ -17,7 +17,7 @@
- "32789:8989"
# POSSIBLE volume for h2 DB itself
flask_ispcif_regcomex:
comex_test:
image: flask_iscpif_regcomex
depends_on:
- mysql_regcomex
......
......@@ -13,21 +13,30 @@ ENV DEBIAN_FRONTEND noninteractive
RUN locale-gen fr_FR fr_FR.UTF-8
RUN dpkg-reconfigure locales
RUN apt-get update && apt-get autoclean
RUN apt-get install -y python3-pip git nano
# Install global dependencies
# Install global dependencies and utilities
RUN apt update && apt autoclean
RUN apt install -y python3-pip libmysqlclient-dev git nano tree htop
RUN pip3 install --upgrade pip
RUN pip3 install gunicorn flask
# for regcomex itself ----------------------------------------------------------
# pull the comex server from repository
RUN git clone https://github.com/moma/regcomex.git
# Install project dependencies
RUN pip3 install -r regcomex/setup/requirements.txt
# main CMD to start the app
WORKDIR /regcomex
# flask dev server
# CMD python3 server_comex_registration.py
# gunicorn production server
CMD bash run.sh
# Ports
EXPOSE 5000
# ports ------------------------------------------------------------------------
# flask dev server
# EXPOSE 5000
# gunicorn production server
EXPOSE 9090
......@@ -37,7 +37,7 @@ WORKDIR /root/doors/application
# build and compile it once so it downloads dependencies
RUN sbt "project lab" compile test package
# sset docker run command to run doors servers
# set docker run command to run doors servers
CMD sbt "project lab" run
# ports
......
Markdown is supported
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