Commit f0cf3c88 authored by David Mendez's avatar David Mendez

Add initial basic files

parent 95a18ea1
Pipeline #91741 failed with stage
# 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
# 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/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# Pycharm project files
.idea/**
# Jobs run dir and output
jobs_run/**
jobs_output/**
app/static/
# Configuration
.env
/config.yml
/config_playground.yml
output.csv
\ No newline at end of file
variables:
DOCKER_TLS_CERTDIR: ""
GIT_STRATEGY: clone
REGISTRY_USER: chembl/chembl
SERVER_APPLICATION: main-web-interface/es-subset-generator
SERVER_IMAGE_TAG: ${CI_REGISTRY}/${REGISTRY_USER}/${SERVER_APPLICATION}:${CI_COMMIT_SHORT_SHA}
DOCKER_DRIVER: overlay
CONFIGS_FOLDER: run_config
# Config unit tests
CONFIG_UNIT_TESTS_FILE_PATH: ${CONFIGS_FOLDER}/unit_tests.yml
# Config staging
CONFIG_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/staging.yml
CONFIG_GUNICORN_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/staging.gunicorn.config.py
INGRESS_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/ingress-staging.yml
AUTOSCALER_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/autoscaler-staging.yml
# Config prod_hx
CONFIG_PROD_HX_FILE_PATH: ${CONFIGS_FOLDER}/prod_hx.yml
CONFIG_GUNICORN_PROD_HX_FILE_PATH: ${CONFIGS_FOLDER}/prod_hx.gunicorn.config.py
INGRESS_PROD_HX_FILE_PATH: ${CONFIGS_FOLDER}/ingress-prod_hx.yml
AUTOSCALER_PROD_HX_FILE_PATH: ${CONFIGS_FOLDER}/autoscaler-prod_hx.yml
# Config prod_hh
CONFIG_PROD_HH_FILE_PATH: ${CONFIGS_FOLDER}/prod_hh.yml
CONFIG_GUNICORN_PROD_HH_FILE_PATH: ${CONFIGS_FOLDER}/prod_hh.gunicorn.config.py
INGRESS_PROD_HH_FILE_PATH: ${CONFIGS_FOLDER}/ingress-prod_hh.yml
AUTOSCALER_PROD_HH_FILE_PATH: ${CONFIGS_FOLDER}/autoscaler-prod_hh.yml
image: docker:latest
services:
- docker:dind
stages:
- build
# - prepare_config_tests
# - test_and_qa
# - prepare_config_staging
# - deploy_to_staging
# - test_staging
# - prepare_config_hx
# - deploy_to_prod_hx
# - test_prod_hx
# - prepare_config_hh
# - deploy_to_prod_hh
# - test_prod_hh
# - functional_tests_prod_public
#
#
# ----------------------------------------------------------------------------------------------------------------------
# build
# ----------------------------------------------------------------------------------------------------------------------
build_docker_image:
image:
name: docker/compose:1.24.1
entrypoint: ["/bin/sh", "-c"]
except:
- schedules
stage: build
variables:
DOCKER_HOST: tcp://docker:2375
script:
- set -x
- docker version # verify docker cli is there. Also prints server info
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- echo building $SERVER_IMAGE_TAG
- docker-compose build elasticsearch-proxy-api-prod
- echo Deploying $SERVER_IMAGE_TAG
- docker push $SERVER_IMAGE_TAG
#
### ----------------------------------------------------------------------------------------------------------------------
### QA
### ----------------------------------------------------------------------------------------------------------------------
#pylint:
# stage: test_and_qa
# image:
# name: $SERVER_IMAGE_TAG
# entrypoint: [""]
# except:
# - schedules
# script:
# - set -x
# - find . -iname "*.py" | grep -v './app/free_text_parsing/.*' | xargs pylint
#
### ---------------------------------------------------------------------------------------------------------------------
### Tests
### ---------------------------------------------------------------------------------------------------------------------
#prepare_config_tests:
# stage: prepare_config_tests
# image:
# name: alpine/git
# entrypoint: ["/bin/sh", "-c"]
# except:
# - schedules
# script:
# - set -x
# - mkdir -p ${CONFIGS_FOLDER}
# - git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
# artifacts:
# paths:
# - ${CONFIG_UNIT_TESTS_FILE_PATH}
#
#unit_tests:
# stage: test_and_qa
# image:
# name: $SERVER_IMAGE_TAG
# entrypoint: [""]
# except:
# - schedules
# script:
# - set -x
# - CONFIG_FILE_PATH=${CONFIG_UNIT_TESTS_FILE_PATH} python -m unittest
#
### ----------------------------------------------------------------------------------------------------------------------
### Deployment to staging
### ----------------------------------------------------------------------------------------------------------------------
#prepare_config_staging:
# stage: prepare_config_staging
# image:
# name: alpine/git
# entrypoint: ["/bin/sh", "-c"]
# only:
# - staging
# script:
# - set -x
# - rm -rf ${CONFIGS_FOLDER} || true
# - mkdir -p ${CONFIGS_FOLDER}
# - git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
# artifacts:
# paths:
# - ${CONFIG_STAGING_FILE_PATH}
# - ${CONFIG_GUNICORN_STAGING_FILE_PATH}
# - ${INGRESS_STAGING_FILE_PATH}
# - ${AUTOSCALER_STAGING_FILE_PATH}
#
#deploy_to_staging:
# stage: deploy_to_staging
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# only:
# - staging
# except:
# - schedules
# environment:
# name: staging
# url: ${SERVER_URL_STAGING}
# script:
# - set -x
# - echo "$KUBE_CA_PEM_HX" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HX} --server="${KUBE_URL_HX}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HX} --token="${KUBE_TOKEN_HX}"
# - kubectl config set-context ${CHEMBL_NS_STAGING} --cluster=${KUBE_CLUS_NAME_HX} --user=${KUBE_USER_HX}
# - kubectl config use-context ${CHEMBL_NS_STAGING}
# - echo ${CHEMBL_NS_STAGING} ${KUBE_URL_HX} ${KUBE_CLUS_NAME_HX} ${KUBE_USER_HX}
# - kubectl get pods -n ${CHEMBL_NS_STAGING}
# - kubectl create secret generic ${RUN_CONFIG_SECRET_NAME_STAGING} --from-file=RUN_CONFIG.yml=${CONFIG_STAGING_FILE_PATH} -o yaml -n ${CHEMBL_NS_STAGING} --dry-run=client | kubectl replace -f -
# - kubectl create secret generic ${GUNICORN_CONFIG_SECRET_NAME_STAGING} --from-file=GUNICORN_CONFIG.py=${CONFIG_GUNICORN_STAGING_FILE_PATH} -o yaml -n ${CHEMBL_NS_STAGING} --dry-run=client | kubectl replace -f -
# - cat ${CONFIG_STAGING_FILE_PATH}
# - cat ${CONFIG_GUNICORN_STAGING_FILE_PATH}
# - sed -i "s~<NAMESPACE>~${CHEMBL_NS_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<NUM_REPLICAS>~${NUM_REPLICAS_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<HTTP_PROXY>~${HTTP_PROXY_HX}~g" k8s-deployment.yaml
# - sed -i "s~<HTTPS_PROXY>~${HTTPS_PROXY_HX}~g" k8s-deployment.yaml
# - sed -i "s~<NO_PROXY>~${NO_PROXY_HX_DEFAULT}~g" k8s-deployment.yaml
# - sed -i "s~<CPU_LIMIT>~${CPU_LIMIT_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<CPU_REQUESTED>~${CPU_REQUESTED_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
# - sed -i "s~<RUN_CONFIG_SECRET_NAME>~${RUN_CONFIG_SECRET_NAME_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<GUNICORN_CONFIG_SECRET_NAME>~${GUNICORN_CONFIG_SECRET_NAME_STAGING}~" k8s-deployment.yaml
# - cat k8s-deployment.yaml
# - kubectl apply -n ${CHEMBL_NS_STAGING} -f k8s-deployment.yaml
# - kubectl get pods -n ${CHEMBL_NS_STAGING}
# - cat ${INGRESS_STAGING_FILE_PATH}
# - kubectl apply -n ${CHEMBL_NS_STAGING} -f ${INGRESS_STAGING_FILE_PATH}
# - kubectl describe ingress -n ${CHEMBL_NS_STAGING}
# - cat ${AUTOSCALER_STAGING_FILE_PATH}
# - kubectl apply -n ${CHEMBL_NS_STAGING} -f ${AUTOSCALER_STAGING_FILE_PATH}
##
### ----------------------------------------------------------------------------------------------------------------------
### Test staging
### ----------------------------------------------------------------------------------------------------------------------
#functional_tests:
# stage: test_staging
# image:
# name: $SERVER_IMAGE_TAG
# entrypoint: [""]
# only:
# - staging
# except:
# - schedules
# environment:
# name: staging
# url: ${SERVER_URL_STAGING}
# script:
# - set -x
# - functional_tests/run_functional_tests.py ${SERVER_URL_STAGING} https://wwwdev.ebi.ac.uk/chembl/interface_api/delayed_jobs
#
### ----------------------------------------------------------------------------------------------------------------------
### Deployment to prod hx
### ----------------------------------------------------------------------------------------------------------------------
#prepare_config_prod_hx:
# stage: prepare_config_hx
# image:
# name: alpine/git
# entrypoint: ["/bin/sh", "-c"]
# only:
# - master
# except:
# - schedules
# script:
# - rm -rf ${CONFIGS_FOLDER} || true
# - mkdir -p ${CONFIGS_FOLDER}
# - git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
# artifacts:
# paths:
# - ${CONFIG_PROD_HX_FILE_PATH}
# - ${CONFIG_GUNICORN_PROD_HX_FILE_PATH}
# - ${INGRESS_PROD_HX_FILE_PATH}
# - ${AUTOSCALER_PROD_HX_FILE_PATH}
#
#deploy_to_prod_hx:
# stage: deploy_to_prod_hx
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# only:
# - master
# except:
# - schedules
# environment:
# name: prod_hx
# script:
# - set -x
# - echo "$KUBE_CA_PEM_HX" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HX} --server="${KUBE_URL_HX}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HX} --token="${KUBE_TOKEN_HX}"
# - kubectl config set-context ${CHEMBL_NS_PROD} --cluster=${KUBE_CLUS_NAME_HX} --user=${KUBE_USER_HX}
# - kubectl config use-context ${CHEMBL_NS_PROD}
# - echo ${CHEMBL_NS_PROD} ${KUBE_URL_HX} ${KUBE_CLUS_NAME_HX} ${KUBE_USER_HX}
# - kubectl get pods -n ${CHEMBL_NS_PROD}
# - kubectl create secret generic ${RUN_CONFIG_SECRET_NAME_PROD_HX} --from-file=RUN_CONFIG.yml=${CONFIG_PROD_HX_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl replace -f -
# - kubectl create secret generic ${GUNICORN_CONFIG_SECRET_NAME_PROD_HX} --from-file=GUNICORN_CONFIG.py=${CONFIG_GUNICORN_PROD_HX_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl replace -f -
# - cat ${CONFIG_PROD_HX_FILE_PATH}
# - cat ${CONFIG_GUNICORN_PROD_HX_FILE_PATH}
# - sed -i "s~<NAMESPACE>~${CHEMBL_NS_PROD}~" k8s-deployment.yaml
# - sed -i "s~<NUM_REPLICAS>~${NUM_REPLICAS_PROD_HX}~" k8s-deployment.yaml
# - sed -i "s~<HTTP_PROXY>~${HTTP_PROXY_HX}~g" k8s-deployment.yaml
# - sed -i "s~<HTTPS_PROXY>~${HTTPS_PROXY_HX}~g" k8s-deployment.yaml
# - sed -i "s~<NO_PROXY>~${NO_PROXY_HX_DEFAULT}~g" k8s-deployment.yaml
# - sed -i "s~<CPU_LIMIT>~${CPU_LIMIT_PROD_HX}~" k8s-deployment.yaml
# - sed -i "s~<CPU_REQUESTED>~${CPU_REQUESTED_PROD_HX}~" k8s-deployment.yaml
# - sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
# - sed -i "s~<RUN_CONFIG_SECRET_NAME>~${RUN_CONFIG_SECRET_NAME_PROD_HX}~" k8s-deployment.yaml
# - sed -i "s~<GUNICORN_CONFIG_SECRET_NAME>~${GUNICORN_CONFIG_SECRET_NAME_PROD_HX}~" k8s-deployment.yaml
# - cat k8s-deployment.yaml
# - kubectl apply -n ${CHEMBL_NS_PROD} -f k8s-deployment.yaml
# - kubectl get pods -n ${CHEMBL_NS_PROD}
# - cat ${INGRESS_PROD_HX_FILE_PATH}
# - kubectl apply -n ${CHEMBL_NS_PROD} -f ${INGRESS_PROD_HX_FILE_PATH}
# - kubectl describe ingress -n ${CHEMBL_NS_PROD}
# - cat ${AUTOSCALER_PROD_HX_FILE_PATH}
# - kubectl apply -n ${CHEMBL_NS_PROD} -f ${AUTOSCALER_PROD_HX_FILE_PATH}
#
#functional_tests_prod_hx:
# stage: test_prod_hx
# image:
# name: $SERVER_IMAGE_TAG
# entrypoint: [""]
# only:
# - master
# except:
# - schedules
# script:
# - set -x
# - sleep 30 # Give some time for the deployment to take effect.
# - functional_tests/run_functional_tests.py ${SERVER_URL_PROD_HX} https://wwwdev.ebi.ac.uk/chembl/interface_api/delayed_jobs
#
### ----------------------------------------------------------------------------------------------------------------------
### Deployment to prod hh
### ----------------------------------------------------------------------------------------------------------------------
#prepare_config_prod_hh:
# stage: prepare_config_hh
# image:
# name: alpine/git
# entrypoint: ["/bin/sh", "-c"]
# only:
# - master
# except:
# - schedules
# script:
# - rm -rf ${CONFIGS_FOLDER} || true
# - mkdir -p ${CONFIGS_FOLDER}
# - git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
# - ls ${CONFIGS_FOLDER}
# artifacts:
# paths:
# - ${CONFIG_PROD_HH_FILE_PATH}
# - ${CONFIG_GUNICORN_PROD_HH_FILE_PATH}
# - ${INGRESS_PROD_HH_FILE_PATH}
# - ${AUTOSCALER_PROD_HH_FILE_PATH}
#
#deploy_to_prod_hh:
# stage: deploy_to_prod_hh
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# only:
# - master
# except:
# - schedules
# environment:
# name: prod_hh
# script:
# - set -x
# - echo "$KUBE_CA_PEM_HH" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HH} --server="${KUBE_URL_HH}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HH} --token="${KUBE_TOKEN_HH}"
# - kubectl config set-context ${CHEMBL_NS_PROD} --cluster=${KUBE_CLUS_NAME_HH} --user=${KUBE_USER_HH}
# - kubectl config use-context ${CHEMBL_NS_PROD}
# - echo ${CHEMBL_NS_PROD} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HH} ${KUBE_USER_HH}
# - kubectl get pods -n ${CHEMBL_NS_PROD}
# - kubectl create secret generic ${RUN_CONFIG_SECRET_NAME_PROD_HH} --from-file=RUN_CONFIG.yml=${CONFIG_PROD_HH_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl replace -f -
# - kubectl create secret generic ${GUNICORN_CONFIG_SECRET_NAME_PROD_HH} --from-file=GUNICORN_CONFIG.py=${CONFIG_GUNICORN_PROD_HH_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl replace -f -
# - cat ${CONFIG_PROD_HH_FILE_PATH}
# - cat ${CONFIG_GUNICORN_PROD_HH_FILE_PATH}
# - sed -i "s~<NAMESPACE>~${CHEMBL_NS_PROD}~" k8s-deployment.yaml
# - sed -i "s~<NUM_REPLICAS>~${NUM_REPLICAS_PROD_HH}~" k8s-deployment.yaml
# - sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
# - sed -i "s~<HTTP_PROXY>~${HTTP_PROXY_HH}~g" k8s-deployment.yaml
# - sed -i "s~<HTTPS_PROXY>~${HTTPS_PROXY_HH}~g" k8s-deployment.yaml
# - sed -i "s~<NO_PROXY>~${NO_PROXY_HH_DEFAULT}~g" k8s-deployment.yaml
# - sed -i "s~<CPU_LIMIT>~${CPU_LIMIT_PROD_HH}~" k8s-deployment.yaml
# - sed -i "s~<CPU_REQUESTED>~${CPU_REQUESTED_PROD_HH}~" k8s-deployment.yaml
# - sed -i "s~<RUN_CONFIG_SECRET_NAME>~${RUN_CONFIG_SECRET_NAME_PROD_HH}~" k8s-deployment.yaml
# - sed -i "s~<GUNICORN_CONFIG_SECRET_NAME>~${GUNICORN_CONFIG_SECRET_NAME_PROD_HH}~" k8s-deployment.yaml
# - cat k8s-deployment.yaml
# - kubectl apply -n ${CHEMBL_NS_PROD} -f k8s-deployment.yaml
# - kubectl get pods -n ${CHEMBL_NS_PROD}
# - cat ${INGRESS_PROD_HH_FILE_PATH}
# - kubectl apply -n ${CHEMBL_NS_PROD} -f ${INGRESS_PROD_HH_FILE_PATH}
# - kubectl describe ingress -n ${CHEMBL_NS_PROD}
# - cat ${AUTOSCALER_PROD_HH_FILE_PATH}
# - kubectl apply -n ${CHEMBL_NS_PROD} -f ${AUTOSCALER_PROD_HH_FILE_PATH}
#
#functional_tests_prod_hh:
# stage: test_prod_hh
# image:
# name: $SERVER_IMAGE_TAG
# entrypoint: [""]
# only:
# - master
# except:
# - schedules
# script:
# - set -x
# - sleep 30 # Give some time for the deployment to take effect.
# - functional_tests/run_functional_tests.py ${SERVER_URL_PROD_HH} https://www.ebi.ac.uk/chembl/interface_api/delayed_jobs
#
## ----------------------------------------------------------------------------------------------------------------------
## Test prod public url
## ----------------------------------------------------------------------------------------------------------------------
#functional_tests_prod_public:
# stage: functional_tests_prod_public
# image:
# name: $SERVER_IMAGE_TAG
# entrypoint: [""]
# only:
# - master
# script:
# - set -x
# - sleep 30 # Give some time for the deployment to take effect.
# - functional_tests/run_functional_tests.py ${SERVER_URL_PROD_PUBLIC} https://www.ebi.ac.uk/chembl/interface_api/delayed_jobs
# ==================================== BASE ====================================
ARG INSTALL_PYTHON_VERSION=${INSTALL_PYTHON_VERSION:-3.8}
FROM python:${INSTALL_PYTHON_VERSION}-slim-buster AS base
ENV CONFIG_FILE_PATH=${CONFIG_FILE_PATH:-'/etc/run_config/RUN_CONFIG.yml'}
ENV GUNICORN_CONFIG_FILE_PATH=${GUNICORN_CONFIG_FILE_PATH:-'/etc/gunicorn_config/GUNICORN_CONFIG.py'}
RUN apt-get update
RUN apt-get install -y \
curl \
netcat \
iputils-ping \
ssh
WORKDIR /app
COPY requirements.txt .
RUN useradd -m glados -u 4321
RUN chown -R glados:glados /app
USER glados
ENV PATH="/home/glados/.local/bin:${PATH}"
RUN pip install --user -r requirements.txt
COPY . .
FROM base AS development-server
ENTRYPOINT FLASK_APP=app flask run --host=0.0.0.0
FROM base AS production-server
ENTRYPOINT gunicorn wsgi:FLASK_APP -c ${GUNICORN_CONFIG_FILE_PATH}
version: '3.8'
x-build-args: &build_args
INSTALL_PYTHON_VERSION: 3.8
services:
es-subset-generator-dev:
build:
context: .
target: development-server
args:
<<: *build_args
image: chembl/es-subset-generator:dev
environment:
- CONFIG_FILE_PATH=/app/config.yml
ports:
- "5000:5000"
es-subset-generator-prod:
build:
context: .
target: production-server
args:
<<: *build_args
image: "${SERVER_IMAGE_TAG:-chembl/es-subset-generator:prod}"
ports:
- "5000:5000"
\ No newline at end of file
Flask==1.1.1
pylint==2.4.2
flask-sqlalchemy==2.4.1
pyyaml==5.1.2
elasticsearch>=7.0.0,<8.0.0 # Recommended by the official documentation
gunicorn==20.0.4
marshmallow==3.5.0
Markdown is supported
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