Skip to content
Snippets Groups Projects
Commit abc62ccf authored by Pierre-Gilles Levallois's avatar Pierre-Gilles Levallois
Browse files

dirs

parent bbc5e0f9
No related branches found
No related tags found
1 merge request!6Fully functional version that calculate layer with all stages
Pipeline #54233 failed
......@@ -8,7 +8,7 @@ FROM debian:10
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY ./ /app/
COPY ./scripts/requirements.txt .
# Basic libs and install python3.7
RUN apt-get update && apt-get upgrade -y \
......@@ -33,7 +33,7 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir manimce \
&& pip install rtree pygeos \
&& pip install --upgrade shapely \
&& pip install --no-cache-dir --upgrade -r ./scripts/requirements.txt
&& pip install --no-cache-dir --upgrade -r ./requirements.txt
# Add a non root user (OpenShift Requirements)
RUN addgroup calquluser && \
......@@ -43,11 +43,16 @@ mkdir -p /app/logs && \
mkdir -p /app/tmp && \
chown -R calquluser:calquluser /app && \
chmod 755 /app/logs /app/tmp /app && \
chmod 755 /app/scripts/*.sh
chmod 755 /app/*.sh
# WORKDIR /app
USER calquluser
# Add app
COPY --chown=calquluser:calquluser ./scripts/*.py ./
COPY --chown=calquluser:calquluser ./scripts/*.sh ./
COPY --chown=calquluser:calquluser ./sql ./
COPY --chown=calquluser:calquluser .env ./
# Arguments
ARG NAMESPACE_ENV
......@@ -71,15 +76,6 @@ ENV DB_PORT=$DB_PORT_ENV
ENV DB_NAME=$DB_NAME_ENV
ENV DB_USER=$DB_USER_ENV
# # Add app
# COPY --chown=calquluser:calquluser ./scripts/*.py ./
# COPY --chown=calquluser:calquluser ./scripts/*.sh ./
# COPY --chown=calquluser:calquluser ./sql ./
# COPY --chown=calquluser:calquluser .env ./
# RUN chmod 755 ./*.sh
# Launch calculation
# Documentation : https://stackoverflow.com/questions/40454470/how-can-i-use-a-variable-inside-a-dockerfile-cmd
CMD [ "/bin/sh", "-c", "/app/scripts/launch.sh $NS_ENV $DB_HOST $DB_PORT $DB_NAME $DB_USER" ]
......@@ -20,7 +20,7 @@ LISTE_COMMUNES=( ["LYON-7EME"]="69387" ["LYON-8EME"]="69388" ["LYON-6EME"]="6938
DATA_REPO="https://forge.grandlyon.com/erasme/data-recalcul-calque.git"
scripts_dir="/app/scripts"
scripts_dir="/app"
data_dir="/arb-data/source-files/data-recalcul-calque"
backup_dir="/arb-data/generated-files"
stage=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment