-
Notifications
You must be signed in to change notification settings - Fork 33
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
Review of V3.0.0 changes #1842
base: master
Are you sure you want to change the base?
Review of V3.0.0 changes #1842
Changes from all commits
f12fe9c
705c5bf
4cd20cc
f15f821
6c8ca82
c0de60e
d2b09f6
d36f200
eab20db
dad4772
38acbb2
3c5fe02
5233d84
a331d12
81797d9
84a92d5
018d76c
998400d
0a5acb5
013f823
13c4ef5
aec47ca
b3e3179
620b968
27d5057
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,78 @@ | ||
*.clisp.mem | ||
*.cmucl.core | ||
*.egg-info | ||
*.fas | ||
*.fasl | ||
*.kdev4 | ||
*.kdevelop | ||
*.kdevses | ||
*.lib | ||
*.pyc | ||
*.sbcl.core | ||
*.sse2f | ||
*.x86f | ||
*~ | ||
.DS_Store | ||
.coverage | ||
.eggs | ||
.kdev4/ | ||
.noseids | ||
.project | ||
.pydevproject | ||
.settings | ||
.version | ||
.ropeproject | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# Idea software family | ||
.idea/ | ||
Invenio.egg-info | ||
Makefile.in | ||
TAGS | ||
bower_components/ | ||
build | ||
compile | ||
dist | ||
docs/_build | ||
docs/db | ||
docs/static | ||
dump.rdb | ||
instance/ | ||
invenio/base/translations/*/LC_MESSAGES/messages.mo | ||
missing | ||
node_modules/ | ||
org.eclipse.core.resources.prefs | ||
tags | ||
install/.vagrant/ | ||
b2share/base/static | ||
nohup.out | ||
app_instance/ | ||
webui/app/b2share-bundle.js | ||
webui/app/b2share-bundle.js.map | ||
webui/app/lib/ | ||
webui/app/vendors/ | ||
webui/src/version.js | ||
webui/package-lock.json | ||
.venv | ||
.pytest_cache/ | ||
.vscode/* | ||
poetry_files | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# end-to-end testing | ||
.e2e_screenshots | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Vim swapfiles | ||
.*.sw? | ||
|
||
# Environment & secrets | ||
.env | ||
|
||
# Development Container | ||
Pipfile | ||
poetry.lock | ||
settings.json | ||
launch.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
FROM node:latest as build-deps | ||
|
||
# Build License Selector | ||
|
||
WORKDIR /tmp | ||
|
||
RUN git clone https://github.com/EUDAT-B2SHARE/public-license-selector.git | ||
WORKDIR /tmp/public-license-selector | ||
RUN npm install --unsafe-perm | ||
#RUN npm audit fix --force | ||
RUN npm run build | ||
|
||
# Build B2Share App | ||
|
||
WORKDIR /opt | ||
|
||
ADD webui/src src | ||
ADD webui/package.json . | ||
ADD webui/webpack.config.js . | ||
|
||
RUN echo "echo 'Files copied !'" > ./copy_files.sh && chmod a+x ./copy_files.sh | ||
|
||
RUN mv webpack.config.js webpack.config.js.0 | ||
RUN echo "require('es6-promise').polyfill();" > webpack.config.js | ||
RUN cat webpack.config.js.0 >> webpack.config.js | ||
RUN npm install es6-promise | ||
RUN npm install --unsafe-perm | ||
|
||
RUN node_modules/webpack/bin/webpack.js -p | ||
|
||
FROM centos:7 | ||
|
||
RUN rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-13.noarch.rpm | ||
|
||
RUN yum -y update | ||
RUN yum -y groupinstall "Development tools" | ||
RUN yum -y install wget gcc-c++ openssl-devel \ | ||
postgresql-devel mysql-devel \ | ||
git libffi-devel libxml2-devel libxml2 \ | ||
libxslt-devel zlib1g-dev libxslt http-parser uwsgi | ||
|
||
# Install Python... | ||
|
||
ENV PYTHON_VER=3.6 | ||
ENV PYTHON_PRG=/usr/bin/python${PYTHON_VER} | ||
ENV PYTHON_ENV=/opt/.venv | ||
ENV PYTHON_LIB=${VIRTUAL_ENV}/lib/python${PYTHON_VER} | ||
|
||
RUN echo -e \ | ||
"\tPYTHON VERSION : $PYTHON_VER\n" \ | ||
"\tPYTHON PROGRAM : $PYTHON_PRG\n" \ | ||
"\tPYTHON VIRTUAL : $PYTHON_ENV\n" \ | ||
"\tPYTHON LIBRARY : $PYTHON_LIB\n" | ||
|
||
RUN yum -y install python${PYTHON_VER//.} python${PYTHON_VER//.}-pip python${PYTHON_VER//.}-devel python${PYTHON_VER//.}-virtualenv | ||
RUN yum -y install uwsgi-plugin-python${PYTHON_VER//.} | ||
|
||
RUN ${PYTHON_PRG} -m virtualenv --python=${PYTHON_PRG} ${PYTHON_ENV} | ||
ENV PATH="$PYTHON_ENV/bin:$PATH" | ||
|
||
# install locale | ||
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 | ||
ENV LC_ALL=en_US.utf-8 | ||
ENV LANG=en_US.utf-8 | ||
|
||
# Prepare application backend... | ||
|
||
ENV B2SHARE_INSTANCE_PATH=/opt/var | ||
|
||
WORKDIR /opt/app | ||
|
||
ADD MANIFEST.in . | ||
ADD entry_points.txt . | ||
ADD requirements.txt . | ||
ADD README.rst . | ||
ADD setup.py . | ||
ADD setup.cfg . | ||
ADD b2share b2share | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
# Prepare application frontend... | ||
|
||
COPY webui/app b2share/modules/b2share_main/static | ||
|
||
RUN mv b2share/modules/b2share_main/static/index.html b2share/modules/b2share_main/templates/b2share_main/page.html | ||
|
||
# Add generated files into lib sub directories... | ||
COPY --from=build-deps /opt/app/b2share-bundle.* b2share/modules/b2share_main/static/ | ||
COPY --from=build-deps /opt/node_modules/bootstrap/dist/css/bootstrap.min.* b2share/modules/b2share_main/static/lib/css/ | ||
COPY --from=build-deps /opt/node_modules/bootstrap-grid/dist/grid.min.css b2share/modules/b2share_main/static/lib/css/bootstrap-grid.min.css | ||
COPY --from=build-deps /opt/node_modules/react-widgets/dist/css/* b2share/modules/b2share_main/static/lib/css/ | ||
COPY --from=build-deps /opt/node_modules/font-awesome/css/* b2share/modules/b2share_main/static/lib/css/ | ||
COPY --from=build-deps /opt/node_modules/react-toggle/style.css b2share/modules/b2share_main/static/lib/css/toggle-style.css | ||
COPY --from=build-deps /opt/node_modules/bootstrap/dist/fonts/* b2share/modules/b2share_main/static/lib/fonts/ | ||
COPY --from=build-deps /opt/node_modules/react-widgets/dist/fonts/* b2share/modules/b2share_main/static/lib/fonts/ | ||
COPY --from=build-deps /opt/node_modules/font-awesome/* b2share/modules/b2share_main/static/lib/fonts/ | ||
COPY --from=build-deps /opt/node_modules/react-widgets/dist/img/* b2share/modules/b2share_main/static/lib/img/ | ||
Comment on lines
+88
to
+98
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note the use of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If / when we separate webui from backend codebase we need to adjust these as needed. |
||
|
||
# Add License Selector | ||
COPY --from=build-deps /tmp/public-license-selector/dist/license-selector.* b2share/modules/b2share_main/static/vendors/ | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install .[all,postgresql,elasticsearch7] | ||
|
||
# Optional for debugging.... | ||
RUN pip install flask_DebugToolBar | ||
|
||
EXPOSE 5000 | ||
|
||
CMD ["b2share"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
# This file is part of EUDAT B2Share. | ||
# Copyright (C) 2015 CERN. | ||
# | ||
# Invenio is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of the | ||
# License, or (at your option) any later version. | ||
# Copyright (C) 2020 EUDAT. | ||
# | ||
# Invenio is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Invenio; if not, write to the Free Software Foundation, Inc., | ||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | ||
|
||
r"""EUDAT B2Share Digital Repository. | ||
# B2SHARE is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
B2SHARE is based on the Invenio framework. It uses multiple Invenio **modules** | ||
enabling the storage and processing and of its data. | ||
For a complete list of Invenio modules used by B2SHARE see the | ||
**requirements.txt** file. | ||
"""B2SHARE.""" | ||
|
||
As an Invenio application, B2SHARE uses Flask to handle HTTP requests. A | ||
B2SHARE service is initialized by the function :func:`~.factory.create_app`. | ||
This function creates the Flask application and loads all B2SHARE and Invenio | ||
modules. | ||
|
||
""" | ||
from __future__ import absolute_import, print_function | ||
|
||
from .version import __version__ | ||
|
||
|
||
__all__ = ("__version__",) | ||
__all__ = ('__version__', ) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""mysite base Invenio configuration.""" | ||
"""B2SHARE base Invenio configuration.""" | ||
|
||
from __future__ import absolute_import, print_function | ||
|
||
from invenio_base.app import create_cli | ||
|
||
from .factory import create_app | ||
from .factory import create_app as b2share_cli | ||
|
||
|
||
cli = create_cli(create_app=create_app) | ||
# B2SHARE CLI application. | ||
cli = create_cli(create_app=b2share_cli) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that these handle moving of webpack built app-folder to correct path in B2SHARE backend and renaming to index.html to
b2share/modules/b2share_main/templates/b2share_main/page.html
(SeeTHEME_FRONTPAGE_TEMPLATE
config.py for more info)