Generate / copy staticfiles + node libraries
This commit is contained in:
parent
aaf1fc1d9b
commit
c013387b03
1 changed files with 14 additions and 3 deletions
17
Dockerfile
17
Dockerfile
|
@ -43,7 +43,7 @@ ENV \
|
||||||
|
|
||||||
RUN python3 -m venv $VIRTUAL_ENV
|
RUN python3 -m venv $VIRTUAL_ENV
|
||||||
|
|
||||||
RUN mkdir -p /build
|
RUN mkdir -p /build/static
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
# Install python dependencies.
|
# Install python dependencies.
|
||||||
|
@ -60,12 +60,23 @@ RUN . /venv/bin/activate && pip install gunicorn
|
||||||
COPY . /build
|
COPY . /build
|
||||||
|
|
||||||
# Copy code required for runtime to the /app folder.
|
# Copy code required for runtime to the /app folder.
|
||||||
RUN mkdir /app
|
RUN mkdir -p /app
|
||||||
RUN cp -r publichealth feedler yarn.lock manage.py /app/
|
RUN cp -r publichealth feedler yarn.lock manage.py /app/
|
||||||
|
|
||||||
|
# node / yarn
|
||||||
|
RUN rm -rf node_modules
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
# Collect static data into /app/static.
|
# Collect static data into /app/static.
|
||||||
RUN . /venv/bin/activate && \
|
RUN . /venv/bin/activate && \
|
||||||
DJANGO_STATIC_ROOT=/app/static ./manage.py collectstatic --no-input
|
DJANGO_STATIC_ROOT=/app/static SECRET_KEY=sl DJANGO_SETTINGS_MODULE=publichealth.settings.production ./manage.py collectstatic --no-input -i media
|
||||||
|
|
||||||
|
RUN mkdir -p /app/publichealth/static/libs
|
||||||
|
RUN ls -al /app/publichealth/static/libs
|
||||||
|
RUN cp -rf node_modules/@bower_components/* /app/publichealth/static/libs
|
||||||
|
#RUN mkdir -p /app/static/libs
|
||||||
|
#RUN cp -rf node_modules/@bower_components/* /app/static/libs
|
||||||
|
#RUN ls -al /app/publichealth/static/libs
|
||||||
|
|
||||||
RUN ls -al /app/
|
RUN ls -al /app/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue