diff --git a/Dockerfile b/Dockerfile index 4b718953..00e78173 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,19 +65,19 @@ COPY ./init-user-db.sh /docker-entrypoint-initdb.d/init-user-db.sh # RUN ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d colouringlondon < $migration; done; -RUN pyvenv colouringlondon -RUN source colouringlondon/bin/activate -RUN pip install --upgrade pip -RUN pip install --upgrade setuptools wheel -RUN pip install -r ./colouring-london/etl/requirements.txt +# RUN pyvenv colouringlondon +# RUN source colouringlondon/bin/activate +# RUN pip install --upgrade pip +# RUN pip install --upgrade setuptools wheel +# RUN pip install -r ./colouring-london/etl/requirements.txt -WORKDIR ./colouring-london/app/etl -RUN python get_test_polygons.py -RUN ./load_geometries_cl.sh ./ -RUN psql -d colouringlondon < ../migrations/002.index-geometries.up.sql -RUN ./create_building_records_cl.sh -RUN psql -d colouringlondon < ../migrations/003.index-buildings.up.sql -RUN ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d colouringlondon < $migration; done; +# WORKDIR ./colouring-london/app/etl +# RUN python get_test_polygons.py +# RUN ./load_geometries_cl.sh ./ +# RUN psql -d colouringlondon < ../migrations/002.index-geometries.up.sql +# RUN ./create_building_records_cl.sh +# UN psql -d colouringlondon < ../migrations/003.index-buildings.up.sql +# RUN ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d colouringlondon < $migration; done; # RUN export NODEJS_HOME=/usr/local/lib/node/node-v16.13.2/bin/ # RUN export PATH=$NODEJS_HOME:$PATH diff --git a/init-user-db.sh b/init-user-db.sh index 09ff7830..4805dc5a 100644 --- a/init-user-db.sh +++ b/init-user-db.sh @@ -11,4 +11,17 @@ psql -d colouringlondon -c "create extension postgis;" psql -d colouringlondon -c "create extension pgcrypto;" psql -d colouringlondon -c "create extension pg_trgm;" +ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d colouringlondon < $migration; done; + +pyvenv colouringlondon +source colouringlondon/bin/activate +pip install --upgrade pip +pip install --upgrade setuptools wheel +pip install -r ./colouring-london/etl/requirements.txt + +python ./colouring-london/app/etl/get_test_polygons.py +./colouring-london/app/etl/load_geometries_cl.sh ./ +psql -d colouringlondon < ./colouring-london/app/migrations/002.index-geometries.up.sql +./create_building_records_cl.sh +psql -d colouringlondon < ./colouring-london/app/migrations/003.index-buildings.up.sql ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d colouringlondon < $migration; done; \ No newline at end of file