Skip to content

Commit

Permalink
primer commit :)
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Jan 12, 2023
0 parents commit dec32b9
Show file tree
Hide file tree
Showing 139 changed files with 55,022 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git
.gitignore
LICENSE
README.md
deploy/db
tests

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deploy/db/data.sql.gz filter=lfs diff=lfs merge=lfs -text
130 changes: 130 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
*~
.#*
.DS_Store
tmp/
.bak


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
#.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Grunt
/ui/grunt

# Tests tmp
/tests/tmp/

# IntelliJ
.idea/

# VS Code
.vscode/

# Custom
deploy/request.json
typings/
deploy/ontologies/*.obo
deploy/ontologies/*.owl*
.antlr/
62 changes: 62 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
##########################
## Build env
##########################
FROM python:3.10-buster AS BUILD

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update
#RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends \
ca-certificates pkg-config make \
libssl-dev libffi-dev libpq-dev

# python packages
RUN pip install --upgrade pip
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

##########################
## Final image
##########################
FROM python:3.10-buster

LABEL maintainer "CRG System Developers"
LABEL org.label-schema.schema-version="2.0"
LABEL org.label-schema.vcs-url="https://github.com/EGA-archive/beacon-2.x/"

# Too much ?
COPY --from=BUILD /usr/local/bin /usr/local/bin
COPY --from=BUILD /usr/local/lib /usr/local/lib

RUN apt-get update && \
# apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
nginx \
&& \
rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list && \
apt-get purge -y --auto-remove

COPY deploy/nginx.conf /beacon/nginx.conf
COPY deploy/supervisord.conf /beacon/supervisord.conf
COPY deploy/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY beacon /beacon/beacon
COPY ui /beacon/ui

RUN groupadd beacon && \
useradd -M -g beacon beacon && \
# mkdir /beacon && \
mkdir /var/run/beacon && \
chown -R beacon:beacon /beacon && \
# chmod 400 /beacon/beacon/conf.py && \
chown -R beacon:beacon /var/log/nginx && \
chown -R beacon:beacon /var/lib/nginx && \
chown -R beacon:beacon /etc/nginx && \
chown -R beacon:beacon /var/run/beacon && \
mkdir -p /var/log/supervisord && \
chown -R beacon:beacon /var/log/supervisord && \
chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /beacon
USER beacon
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
Loading

0 comments on commit dec32b9

Please sign in to comment.