Commit db4269cb authored by Tim's avatar Tim
Browse files

init

parent bd78e1a4
Pipeline #666 passed with stage
in 32 seconds
# 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/
pip-wheel-metadata/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# 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/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
image: docker:git
stages:
- local-image-build-n-push
Push Tagged:
stage: local-image-build-n-push
only:
- tags
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --no-cache . -t $CI_REGISTRY_IMAGE:prod -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- docker push $CI_REGISTRY_IMAGE --all-tags
Push latest:
stage: local-image-build-n-push
only:
# Only "master" should be tagged "latest"
- master
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --no-cache . -t $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE --all-tags
\ No newline at end of file
FROM python:3.8-slim
RUN mkdir -p /app
COPY src /app
WORKDIR /app
COPY reqs.txt /app
RUN pip3 install -r reqs.txt
COPY src /app
CMD ["python3", "main.py"]
# processing_semspec_init
todo `call de.derivo.semspect.server.reload`
\ No newline at end of file
Runs `call de.derivo.semspect.server.reload`
\ No newline at end of file
import os
import logging
from py2neo import Graph
import json
from py2neo.database.work import ClientError
log = logging.getLogger(__name__)
log.addHandler(logging.StreamHandler())
log.addHandler(logging.FileHandler("log.txt"))
log.setLevel(os.getenv("LOG_LEVEL", "INFO"))
NEO4J_CONFIG_STRING = os.getenv("NEO4J", "{}")
NEO4J_CONFIG_DICT = json.loads(NEO4J_CONFIG_STRING)
log.debug("NEO4J conf: \n{}".format(json.dumps(NEO4J_CONFIG_DICT)))
g = Graph(**NEO4J_CONFIG_DICT)
log.info("RUN call de.derivo.semspect.server.reload")
res = g.run("call de.derivo.semspect.server.reload")
log.info(res)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment