diff --git a/Jenkinsfile b/Jenkinsfile index d87695cc4..7cf0861c0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,11 @@ pipeline { switch (env.BRANCH_NAME) { case 'master': env.NODE_ENV = 'production' + env.BACK_REPLICAS = 4 break case 'test': env.NODE_ENV = 'test' + env.BACK_REPLICAS = 2 break } } diff --git a/docker-compose.yml b/docker-compose.yml index b244166ae..24e1446e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: dockerfile: front/Dockerfile ports: - 80 + deploy: + replicas: 2 back: image: registry.verdnatura.es/salix-back:${BRANCH_NAME:?} build: . @@ -27,6 +29,8 @@ services: - /mnt/storage/pdfs:/var/lib/salix/pdfs - /mnt/storage/dms:/var/lib/salix/dms - /mnt/storage/image:/var/lib/salix/image + deploy: + replicas: ${BACK_REPLICAS:?} configs: datasources: external: true