Skip to content

Commit

Permalink
docker: add alt assets inclusion during build
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Panero committed Mar 19, 2020
1 parent 49c7392 commit 4716aff
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion {{cookiecutter.project_shortname}}/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,25 @@

FROM inveniosoftware/centos7-python:3.6

ARG include_assets

COPY Pipfile Pipfile.lock ./
RUN pipenv install --deploy --system

COPY ./ .
COPY ./docker/uwsgi/ ${INVENIO_INSTANCE_PATH}
COPY ./invenio.cfg ${INVENIO_INSTANCE_PATH}
COPY ./templates/ ${INVENIO_INSTANCE_PATH}/templates/
COPY ./ .

RUN if [ "$include_assets" = "true" ]; \
then \
cp -r ./static/ ${INVENIO_INSTANCE_PATH}/static/ && \
cp -r ./assets/ ${INVENIO_INSTANCE_PATH}/assets/ && \
invenio collect --verbose && \
invenio webpack create && \
# --unsafe needed because we are running as root
invenio webpack install --unsafe && \
invenio webpack build \
; fi

ENTRYPOINT [ "bash", "-c"]

0 comments on commit 4716aff

Please sign in to comment.