Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: add alt assets inclusion during build #56

Merged
merged 3 commits into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ pipfile_lock_path="./Pipfile.lock"

if [ ! -f $pipfile_lock_path ]; then
echo "'Pipfile.lock' not found. Generating via 'pipenv lock --dev'..."
pipenv lock --dev --pre
pipenv lock --dev
fi

# Installs all packages specified in Pipfile.lock
pipenv sync --dev --pre
pipenv sync --dev
# Build assets
pipenv run invenio collect -v
pipenv run invenio webpack buildall
10 changes: 10 additions & 0 deletions {{cookiecutter.project_shortname}}/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

FROM inveniosoftware/centos7-python:3.6

ARG include_assets

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

Expand All @@ -28,4 +30,12 @@ COPY ./invenio.cfg ${INVENIO_INSTANCE_PATH}
COPY ./templates/ ${INVENIO_INSTANCE_PATH}/templates/
COPY ./ .
ppanero marked this conversation as resolved.
Show resolved Hide resolved

RUN if [ "$include_assets" = "true" ]; \
ppanero marked this conversation as resolved.
Show resolved Hide resolved
then \
cp -r ./static/. ${INVENIO_INSTANCE_PATH}/static/ && \
cp -r ./assets/. ${INVENIO_INSTANCE_PATH}/assets/ && \
invenio collect --verbose && \
invenio webpack buildall \
; fi

ENTRYPOINT [ "bash", "-c"]