Skip to content

Commit

Permalink
Merge pull request #493 from spryker/task/integrate-jenkins-and-redis
Browse files Browse the repository at this point in the history
SC-19447: Update services version
  • Loading branch information
herasimenko1987 authored Apr 23, 2024
2 parents 6ee17ba + cde1fea commit 1ba74fe
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
18 changes: 18 additions & 0 deletions generator/src/templates/service/jenkins/2.401/jenkins.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ serviceName }}:
image: spryker/jenkins:2.401
networks:
- private
labels:
'spryker.app.name': scheduler
'spryker.app.type': services
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8080" ]
interval: 10s
timeout: 5s
retries: 5
environment:
JAVA_OPTS: '-Djenkins.install.runSetupWizard=false -Xms128m -Xmx128m -Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION={{ serviceData['csrf-protection-enabled'] ? 'false' : 'true' }}'
volumes:
- {{ serviceName }}-{{ serviceData['engine'] }}-data:/var/jenkins_home:rw
- ${DEPLOYMENT_PATH}/context/jenkins/spryker.sh:/usr/bin/spryker.sh:rw
18 changes: 18 additions & 0 deletions generator/src/templates/service/jenkins/2.442/jenkins.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ serviceName }}:
image: spryker/jenkins:2.442
networks:
- private
labels:
'spryker.app.name': scheduler
'spryker.app.type': services
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8080" ]
interval: 10s
timeout: 5s
retries: 5
environment:
JAVA_OPTS: '-Djenkins.install.runSetupWizard=false -Xms128m -Xmx128m -Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION={{ serviceData['csrf-protection-enabled'] ? 'false' : 'true' }}'
volumes:
- {{ serviceName }}-{{ serviceData['engine'] }}-data:/var/jenkins_home:rw
- ${DEPLOYMENT_PATH}/context/jenkins/spryker.sh:/usr/bin/spryker.sh:rw
42 changes: 42 additions & 0 deletions generator/src/templates/service/redis/6.2/redis.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{ serviceName }}:
image: redis:6.2-alpine
command: 'redis-server /usr/local/etc/redis/redis.conf --appendonly yes --save \"\"'
networks:
- private
labels:
'spryker.app.name': storage
'spryker.app.type': services
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- {{ serviceName }}-{{ serviceData['engine'] }}-data:/data
- ./${DEPLOYMENT_PATH}/context/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro

{% if serviceData['replica-services'] is defined %}
{% for replica in serviceData['replica-services'] %}
{{ serviceName }}_{{ replica }}:
image: redis:6.2-alpine
command: "redis-server /usr/local/etc/redis/redis.conf --slaveof {{ serviceName }} 6379"
depends_on:
- {{ serviceName }}
networks:
- private
labels:
'spryker.app.name': storage
'spryker.app.type': services
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- {{ serviceName }}-{{ serviceData['engine'] }}-data:/data
- ./${DEPLOYMENT_PATH}/context/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro

{% endfor %}
{% endif %}

0 comments on commit 1ba74fe

Please sign in to comment.