Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
manan164 committed Apr 12, 2023
2 parents e4e7e0d + 3d9b27f commit 90fd3fd
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,12 @@ public void setWorkerId(String workerId) {
@JsonIgnore
public Map<String, Object> getOutputData() {
if (!outputPayload.isEmpty() && !outputData.isEmpty()) {
outputData.putAll(outputPayload);
// Combine payload + data
// data has precedence over payload because:
// with external storage enabled, payload contains the old values
// while data contains the latest and if payload took precedence, it
// would remove latest outputs
outputPayload.forEach(outputData::putIfAbsent);
outputPayload = new HashMap<>();
return outputData;
} else if (outputPayload.isEmpty()) {
Expand Down
60 changes: 60 additions & 0 deletions docker/docker-compose-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,36 @@ services:
conductor-server:
environment:
- CONFIG_PROP=config-postgres.properties
image: conductor:server
container_name: conductor-server
build:
context: ../
dockerfile: docker/server/Dockerfile
networks:
- internal
ports:
- 8080:8080
healthcheck:
test: [ "CMD", "curl","-I" ,"-XGET", "http://localhost:8080/health" ]
interval: 60s
timeout: 30s
retries: 12
links:
- elasticsearch:es
- redis:rs
- postgres:postgresdb
depends_on:
elasticsearch:
condition: service_healthy
redis:
condition: service_healthy
postgres:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"

postgres:
image: postgres
Expand All @@ -32,6 +57,41 @@ services:
max-size: "1k"
max-file: "3"

redis:
image: redis:6.2.3-alpine
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
networks:
- internal
ports:
- 6379:6379
healthcheck:
test: [ "CMD", "redis-cli","ping" ]

elasticsearch:
image: elasticsearch:6.8.15
container_name: elasticsearch
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx1024m"
- transport.host=0.0.0.0
- discovery.type=single-node
- xpack.security.enabled=false
networks:
- internal
ports:
- 9200:9200
- 9300:9300
healthcheck:
test: wget http://localhost:9200/ -O /dev/null
interval: 5s
timeout: 5s
retries: 12
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"

volumes:
pgdata-conductor:
driver: local
Expand Down
27 changes: 4 additions & 23 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ services:
links:
- elasticsearch:es
- redis:rs
- rabbitmq:amqp
depends_on:
elasticsearch:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
logging:
driver: "json-file"
options:
Expand All @@ -55,13 +52,15 @@ services:
image: redis:6.2.3-alpine
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
networks:
- internal
ports:
- 6379:6379
healthcheck:
test: [ "CMD", "redis-cli","ping" ]

elasticsearch:
image: elasticsearch:8.6.2
image: elasticsearch:6.8.15
container_name: elasticsearch
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx1024m"
Expand All @@ -76,7 +75,7 @@ services:
- 9200:9200
- 9300:9300
healthcheck:
test: timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/9300'
test: wget http://localhost:9200/ -O /dev/null
interval: 5s
timeout: 5s
retries: 12
Expand All @@ -85,24 +84,6 @@ services:
options:
max-size: "1k"
max-file: "3"
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: rabbitmq
volumes:
- ./.docker/rabbitmq/etc/:/etc/rabbitmq/
- ./.docker/rabbitmq/data/:/var/lib/rabbitmq/
- ./.docker/rabbitmq/logs/:/var/log/rabbitmq/
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
healthcheck:
test: [ "CMD", "wget", "http://localhost:15672", "-O", "/dev/null" ]
interval: 30s
timeout: 10s
retries: 5
ports:
- 5672:5672
- 15672:15672

volumes:
esdata-conductor:
Expand Down
2 changes: 1 addition & 1 deletion docker/server/config/config-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ conductor.db.type=redis_standalone

# Dynomite Cluster details.
# format is host:port:rack separated by semicolon
conductor.redis.hosts=rs:63709:us-east-1c
conductor.redis.hosts=rs:6379:us-east-1c

# Namespace for the keys stored in Dynomite/Redis
conductor.redis.workflowNamespacePrefix=conductor
Expand Down

0 comments on commit 90fd3fd

Please sign in to comment.