Skip to content

Commit

Permalink
update docker compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
MBueschelberger committed Sep 7, 2023
1 parent ab9c457 commit a30de82
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
AUTHENTICAION_DEPENDENCIES=False
BUILD_VERSION=v2.0.0
WRAPPER_TAG=v1.0.0
BASE_IMAGE=registry.gitlab.cc-asp.fraunhofer.de/reaxpro/simphony-catalytic
DOCKER_BUILD_TARGET=develop
INSTALL_SLURM=no
SLURM_VERSION=23.02.4

Expand All @@ -11,7 +9,7 @@ WRAPPER_DEPS_EXTRA=git+https://github.com/SCM-NV/PLAMS@7661960a9db53249a0b77935d

PYTHON_BIN=python3
REAXPRO_FASTAPI_HOST=0.0.0.0
REAXPRO_FASTAPI_PORT=8081
REAXPRO_FASTAPI_PORT=8080
REAXPRO_WORKER_CONCURRENCY=5

REAXPRO_SCHEMAS="osp.models.multiscale.co_pt111_full:COPt111FullscaleModel| osp.models.multiscale.co_pt111_full:COPt111FromMesoScaleModel | osp.models.multiscale.co_pt111_meso:PESExploration | osp.models.multiscale.co_pt111_meso:COPt111MesoscaleModel | osp.models.catalytic.co_catalyticfoam:COCatalyticFOAMModel | osp.models.ams.energy_landscape_refinement:EnergyLandscapeRefinement | osp.models.zacros.co_pyzacros:COpyZacrosModel"
Expand Down
17 changes: 9 additions & 8 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ version: "3"

services:
fastapi:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-${DOCKER_BUILD_TARGET:-develop}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-develop"
build:
context: "."
dockerfile: Dockerfile.api
target: "${DOCKER_BUILD_TARGET:-develop}"
target: develop
args:
- INSTALL_SLURM=$INSTALL_SLURM
- INSTALL_SLURM=${INSTALL_SLURM:-no}
- SLURM_VERSION=$SLURM_VERSION
- WRAPPER_DEPS_INSTALL=$WRAPPER_DEPS_INSTALL
- WRAPPER_DEPS_EXTRA=$WRAPPER_DEPS_EXTRA
Expand Down Expand Up @@ -41,15 +41,15 @@ services:
- reaxpro

headworker:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-${DOCKER_BUILD_TARGET:-develop}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-develop"
build:
context: "."
dockerfile: Dockerfile.api
target: "${DOCKER_BUILD_TARGET:-develop}"
target: develop
args:
- WRAPPER_DEPS_INSTALL=$WRAPPER_DEPS_INSTALL
- WRAPPER_DEPS_EXTRA=$WRAPPER_DEPS_EXTRA
- INSTALL_SLURM=$INSTALL_SLURM
- INSTALL_SLURM=${INSTALL_SLURM:-no}
- SLURM_VERSION=$SLURM_VERSION
environment:
REAXPRO_WORKER_NAME: simphony-workflows
Expand Down Expand Up @@ -77,14 +77,15 @@ services:
- reaxpro

catalyticfoam:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:catalyticfoam-${BUILD_VERSION:-latest}-${DOCKER_BUILD_TARGET:-develop}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:catalyticfoam-${BUILD_VERSION:-latest}-develop"
build:
context: "."
target: "${DOCKER_BUILD_TARGET:-develop}"
target: develop
dockerfile: Dockerfile.catalyticfoam
args:
- BASE_IMAGE=$BASE_IMAGE
- WRAPPER_TAG=$WRAPPER_TAG
- INSTALL_SLURM=${INSTALL_SLURM:-no}
- SLURM_VERSION=$SLURM_VERSION
environment:
REAXPRO_WORKER_NAME: simphony-catalyticfoam
Expand Down
99 changes: 99 additions & 0 deletions docker-compose.marketplace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
version: "3"

services:
fastapi:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-production"
ports:
- "${REAXPRO_FASTAPI_PORT:-8080}:8080"
environment:
REAXPRO_REDIS_TYPE: redis
REAXPRO_REDIS_HOST: redis
REAXPRO_REDIS_PORT: 6379
REAXPRO_REDIS_DB: 3
REAXPRO_SCHEMAS: ${REAXPRO_SCHEMAS}
REAXPRO_MINIO_ENDPOINT: minio:9000
REAXPRO_MINIO_USER: ${REAXPRO_MINIO_USER}
REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
REAXPRO_FASTAPI_HOST: ${REAXPRO_FASTAPI_HOST:-'0.0.0.0'}
REAXPRO_FASTAPI_PORT: ${REAXPRO_FASTAPI_PORT:-8080}
REAXPRO_AUTHENTICATION_DEPENDENCIES: True
PYTHON_BIN: ${PYTHON_BIN:-python3}
KEYCLOAK_HOST: ${KEYCLOAK_HOST}
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID}
KEYCLOAK_CLIENT_SECRET: ${KEYCLOAK_CLIENT_SECRET}
KEYCLOAK_REALM_NAME: ${KEYCLOAK_REALM_NAME}
APP_MODE: server
depends_on:
- redis
- minio
networks:
- reaxpro

headworker:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-production"
environment:
REAXPRO_WORKER_NAME: simphony-workflows
REAXPRO_REDIS_TYPE: redis
REAXPRO_REDIS_HOST: redis
REAXPRO_REDIS_PORT: 6379
REAXPRO_REDIS_DB: 3
REAXPRO_WORKER_MAPPING: ${REAXPRO_WORKER_MAPPING}
REAXPRO_MINIO_ENDPOINT: minio:9000
REAXPRO_MINIO_USER: ${REAXPRO_MINIO_USER}
REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
REAXPRO_WORKER_CONCURRENCY: ${REAXPRO_WORKER_CONCURRENCY:-5}
PYTHON_BIN: ${PYTHON_BIN:-python3}
APP_MODE: worker
depends_on:
- redis
- minio
networks:
- reaxpro

catalyticfoam:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:catalyticfoam-${BUILD_VERSION:-latest}-production"
environment:
REAXPRO_WORKER_NAME: simphony-catalyticfoam
REAXPRO_WRAPPER_NAME: osp.wrappers.simcatalyticfoam.simcatalyticfoam:SimCatalyticFoamSession
REAXPRO_REDIS_TYPE: redis
REAXPRO_REDIS_HOST: redis
REAXPRO_REDIS_PORT: 6379
REAXPRO_REDIS_DB: 3
REAXPRO_MINIO_ENDPOINT: minio:9000
REAXPRO_MINIO_USER: ${REAXPRO_MINIO_USER}
REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
REAXPRO_WORKER_CONCURRENCY: ${REAXPRO_WORKER_CONCURRENCY:-5}
PYTHON_BIN: ${PYTHON_BIN:-python3}
APP_MODE: worker
depends_on:
- redis
- minio
networks:
- reaxpro

redis:
image: redis:latest
volumes:
- redis-data:/data
networks:
- reaxpro

minio:
image: quay.io/minio/minio
ports:
- 9000
environment:
MINIO_ROOT_USER: ${REAXPRO_MINIO_USER}
MINIO_ROOT_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
volumes:
- minio-data:/data
command: server /data
networks:
- reaxpro

volumes:
redis-data:
minio-data:

networks:
reaxpro:
125 changes: 125 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
version: "3"

services:
fastapi:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-prod"
build:
context: "."
dockerfile: Dockerfile.api
target: production
args:
- INSTALL_SLURM=${INSTALL_SLURM:-no}
- SLURM_VERSION=$SLURM_VERSION
- WRAPPER_DEPS_INSTALL=$WRAPPER_DEPS_INSTALL
- WRAPPER_DEPS_EXTRA=$WRAPPER_DEPS_EXTRA
ports:
- "${REAXPRO_FASTAPI_PORT:-8080}:${REAXPRO_FASTAPI_PORT:-8080}"
environment:
REAXPRO_REDIS_TYPE: redis
REAXPRO_REDIS_HOST: redis
REAXPRO_REDIS_PORT: 6379
REAXPRO_REDIS_DB: 3
REAXPRO_REDIS_TEST_DB: 9
REAXPRO_AUTHENTICATION_DEPENDENCIES: ${AUTHENTICATION_DEPENDENCIES}
REAXPRO_SCHEMAS: ${REAXPRO_SCHEMAS}
REAXPRO_MINIO_ENDPOINT: minio:9000
REAXPRO_MINIO_USER: ${REAXPRO_MINIO_USER}
REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
REAXPRO_FASTAPI_HOST: ${REAXPRO_FASTAPI_HOST:-'0.0.0.0'}
REAXPRO_FASTAPI_PORT: ${REAXPRO_FASTAPI_PORT:-8080}
PYTHON_BIN: ${PYTHON_BIN:-python3}
APP_MODE: server
depends_on:
- redis
- minio
networks:
- reaxpro

headworker:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-production"
build:
context: "."
dockerfile: Dockerfile.api
target: production
args:
- WRAPPER_DEPS_INSTALL=$WRAPPER_DEPS_INSTALL
- WRAPPER_DEPS_EXTRA=$WRAPPER_DEPS_EXTRA
- INSTALL_SLURM=${INSTALL_SLURM:-no}
- SLURM_VERSION=$SLURM_VERSION
environment:
REAXPRO_WORKER_NAME: simphony-workflows
REAXPRO_REDIS_TYPE: redis
REAXPRO_REDIS_HOST: redis
REAXPRO_REDIS_PORT: 6379
REAXPRO_REDIS_DB: 3
REAXPRO_REDIS_TEST_DB: 9
REAXPRO_WORKER_MAPPING: ${REAXPRO_WORKER_MAPPING}
REAXPRO_MINIO_ENDPOINT: minio:9000
REAXPRO_MINIO_USER: ${REAXPRO_MINIO_USER}
REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
REAXPRO_WORKER_CONCURRENCY: ${REAXPRO_WORKER_CONCURRENCY:-5}
PYTHON_BIN: ${PYTHON_BIN:-python3}
APP_MODE: worker
depends_on:
- redis
- minio
networks:
- reaxpro

catalyticfoam:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:catalyticfoam-${BUILD_VERSION:-latest}-production"
build:
context: "."
target: production
dockerfile: Dockerfile.catalyticfoam
args:
- BASE_IMAGE=$BASE_IMAGE
- WRAPPER_TAG=$WRAPPER_TAG
- INSTALL_SLURM=${INSTALL_SLURM:-no}
- SLURM_VERSION=$SLURM_VERSION
environment:
REAXPRO_WORKER_NAME: simphony-catalyticfoam
REAXPRO_WRAPPER_NAME: osp.wrappers.simcatalyticfoam.simcatalyticfoam:SimCatalyticFoamSession
REAXPRO_REDIS_TYPE: redis
REAXPRO_REDIS_HOST: redis
REAXPRO_REDIS_PORT: 6379
REAXPRO_REDIS_DB: 3
REAXPRO_REDIS_TEST_DB: 9
REAXPRO_MINIO_ENDPOINT: minio:9000
REAXPRO_MINIO_USER: ${REAXPRO_MINIO_USER}
REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
REAXPRO_WORKER_CONCURRENCY: ${REAXPRO_WORKER_CONCURRENCY:-5}
PYTHON_BIN: ${PYTHON_BIN:-python3}
APP_MODE: worker
depends_on:
- redis
- minio
networks:
- reaxpro

redis:
image: redis:latest
volumes:
- redis-data:/data
networks:
- reaxpro

minio:
image: quay.io/minio/minio
ports:
- 9000
environment:
MINIO_ROOT_USER: ${REAXPRO_MINIO_USER}
MINIO_ROOT_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
volumes:
- minio-data:/data
command: server /data
networks:
- reaxpro

volumes:
redis-data:
minio-data:

networks:
reaxpro:
6 changes: 3 additions & 3 deletions docker-compose.singularity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ version: "3"

services:
reaxpro:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-singularity-${DOCKER_BUILD_TARGET:-develop}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-singularity-production"
build:
context: "."
dockerfile: Dockerfile.singularity
target: "${DOCKER_BUILD_TARGET:-develop}"
target: "production"
args:
- BASE_IMAGE=$BASE_IMAGE
- WRAPPER_TAG=$WRAPPER_TAG
- INSTALL_SLURM=$INSTALL_SLURM
- INSTALL_SLURM=${INSTALL_SLURM:-no}
- SLURM_VERSION=$SLURM_VERSION
ports:
- "${REAXPRO_FASTAPI_PORT:-8081}:${REAXPRO_FASTAPI_PORT:-8081}"
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
fastapi:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-production"
ports:
- "${REAXPRO_FASTAPI_PORT:-8080}:8080"
environment:
Expand All @@ -26,7 +26,7 @@ services:
- reaxpro

headworker:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-production"
environment:
REAXPRO_WORKER_NAME: simphony-workflows
REAXPRO_REDIS_TYPE: redis
Expand All @@ -47,7 +47,7 @@ services:
- reaxpro

catalyticfoam:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:catalyticfoam-${BUILD_VERSION:-latest}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:catalyticfoam-${BUILD_VERSION:-latest}-production"
environment:
REAXPRO_WORKER_NAME: simphony-catalyticfoam
REAXPRO_WRAPPER_NAME: osp.wrappers.simcatalyticfoam.simcatalyticfoam:SimCatalyticFoamSession
Expand All @@ -68,7 +68,7 @@ services:
- reaxpro

ams:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-production"
environment:
REAXPRO_WORKER_NAME: simphony-ams
REAXPRO_WRAPPER_NAME: osp.wrappers.simams.simams_session:SimamsSession
Expand Down Expand Up @@ -100,7 +100,7 @@ services:
- reaxpro

zacros:
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}"
image: "registry.gitlab.cc-asp.fraunhofer.de/reaxpro/fastapi-celery:${BUILD_VERSION:-latest}-production"
environment:
REAXPRO_WORKER_NAME: simphony-zacros
REAXPRO_WRAPPER_NAME: osp.wrappers.simzacros.simzacros_session:SimzacrosSession
Expand Down

0 comments on commit a30de82

Please sign in to comment.