reorder dockerfile

This commit is contained in:
Ed Chalstrey 2022-02-08 10:45:19 +00:00
parent 7c0936a063
commit 9ad4a82c76

View File

@ -71,13 +71,6 @@ RUN pip install --upgrade pip
RUN pip install --upgrade setuptools wheel RUN pip install --upgrade setuptools wheel
RUN pip install -r ./colouring-london/etl/requirements.txt RUN pip install -r ./colouring-london/etl/requirements.txt
# RUN export NODEJS_HOME=/usr/local/lib/node/node-v16.13.2/bin/
# RUN export PATH=$NODEJS_HOME:$PATH
RUN npm install -g npm@latest
WORKDIR ./colouring-london/app
RUN npm install
WORKDIR ./colouring-london/app/etl WORKDIR ./colouring-london/app/etl
RUN python get_test_polygons.py RUN python get_test_polygons.py
RUN ./load_geometries_cl.sh ./ RUN ./load_geometries_cl.sh ./
@ -86,6 +79,13 @@ RUN ./create_building_records_cl.sh
RUN psql -d colouringlondon < ../migrations/003.index-buildings.up.sql 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; 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
RUN npm install -g npm@latest
WORKDIR ./colouring-london/app
RUN npm install
WORKDIR ./colouring-london/app WORKDIR ./colouring-london/app
EXPOSE 8080 EXPOSE 8080
CMD /wait && PGPASSWORD=postgres PGDATABASE=colouringlondon PGUSER=dockeruser PGHOST=localhost PGPORT=5432 APP_COOKIE_SECRET=123456 npm start CMD /wait && PGPASSWORD=postgres PGDATABASE=colouringlondon PGUSER=dockeruser PGHOST=localhost PGPORT=5432 APP_COOKIE_SECRET=123456 npm start