Skip to content

Commit

Permalink
docker compose changes
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Sep 10, 2023
1 parent 22967e3 commit abb08a7
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 61 deletions.
27 changes: 13 additions & 14 deletions docker/docker-compose-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '2.3'
services:
conductor-server:
environment:
- CONFIG_PROP=config-local-postgres.properties
- CONFIG_PROP=config-postgres.properties
image: conductor:server
container_name: conductor-server
build:
Expand All @@ -19,13 +19,13 @@ services:
timeout: 30s
retries: 12
links:
- elasticsearch:es
- redis:rs
- conductor-elasticsearch:es
- conductor-redis:rs
- postgres:postgresdb
depends_on:
elasticsearch:
conductor-elasticsearch:
condition: service_healthy
redis:
conductor-redis:
condition: service_healthy
postgres:
condition: service_healthy
Expand Down Expand Up @@ -57,7 +57,7 @@ services:
max-size: "1k"
max-file: "3"

redis:
conductor-redis:
image: redis:6.2.3-alpine
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
Expand All @@ -68,21 +68,20 @@ services:
healthcheck:
test: [ "CMD", "redis-cli","ping" ]

elasticsearch:
image: elasticsearch:6.8.15
container_name: elasticsearch
conductor-elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.11
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx1024m"
- transport.host=0.0.0.0
- discovery.type=single-node
- xpack.security.enabled=false
- discovery.type=single-node
volumes:
- esdata-conductor:/usr/share/elasticsearch/data
networks:
- internal
ports:
- 9200:9200
- 9300:9300
- 9201:9200
healthcheck:
test: wget http://localhost:9200/ -O /dev/null
test: curl http://localhost:9200/_cluster/health -o /dev/null
interval: 5s
timeout: 5s
retries: 12
Expand Down
46 changes: 14 additions & 32 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '2.3'
services:
conductor-server:
environment:
-
- CONFIG_PROP=/app/config/config-redis.properties
image: conductor:server
container_name: conductor-server
build:
Expand All @@ -13,69 +13,51 @@ services:
- internal
ports:
- 8080:8080
- 5000:5000
healthcheck:
test: ["CMD", "curl","-I" ,"-XGET", "http://localhost:8080/health"]
interval: 60s
timeout: 30s
retries: 12
links:
- elasticsearch:es
- redis:rs
- conductor-elasticsearch:es
- conductor-redis:rs
depends_on:
elasticsearch:
conductor-elasticsearch:
condition: service_healthy
redis:
conductor-redis:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"

conductor-ui:
environment:
- WF_SERVER=http://conductor-server:8080
image: conductor:ui
container_name: conductor-ui
build:
context: ../
dockerfile: docker/ui/Dockerfile
networks:
- internal
ports:
- 5000:5000
links:
- conductor-server
stdin_open: true

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

elasticsearch:
image: elasticsearch:6.8.15
container_name: elasticsearch
conductor-elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.11
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx1024m"
- transport.host=0.0.0.0
- discovery.type=single-node
- xpack.security.enabled=false
- discovery.type=single-node
volumes:
- esdata-conductor:/usr/share/elasticsearch/data
networks:
- internal
ports:
- 9200:9200
- 9300:9300
- 9201:9200
healthcheck:
test: wget http://localhost:9200/ -O /dev/null
test: curl http://localhost:9200/_cluster/health -o /dev/null
interval: 5s
timeout: 5s
retries: 12
Expand Down
6 changes: 0 additions & 6 deletions docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ RUN rm -rf ./*
COPY --from=builder /conductor/ui/build .
COPY --from=builder /conductor/docker/server/nginx/nginx.conf /etc/nginx/http.d/default.conf

# Copy compiled UI assets to nginx www directory
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /conductor/ui/build .
COPY --from=builder /conductor/docker/server/nginx/nginx.conf /etc/nginx/conf.d/default.conf

# Copy the files for the server into the app folders
RUN chmod +x /app/startup.sh

Expand Down
6 changes: 4 additions & 2 deletions docker/server/config/config-redis.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ conductor.redis.taskDefCacheRefreshInterval=1
conductor.redis.workflowNamespacePrefix=conductor
conductor.redis.queueNamespacePrefix=conductor_queues

#Use redis queues
conductor.queue.type=redis_standalone

# Elastic search instance indexing is enabled.
conductor.indexing.enabled=true

# Transport address to elasticsearch
conductor.elasticsearch.url=http://es:9200
conductor.elasticsearch.indexName=conductor
conductor.elasticsearch.version=7

# Additional modules for metrics collection exposed to Prometheus (optional)
conductor.metrics-prometheus.enabled=true
Expand Down
14 changes: 7 additions & 7 deletions docker/ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#
# conductor:ui - Netflix Conductor UI
#
FROM node:16-alpine
FROM node:20-alpine
LABEL maintainer="Netflix OSS <conductor@netflix.com>"

# Install the required packages for the node build
# to run on alpine
RUN apk update && apk add --no-cache python3 py3-pip make g++

# A directory within the virtualized Docker environment
# Becomes more relevant when using Docker Compose later
WORKDIR /usr/src/app

# Copies package.json to Docker environment in a separate layer as a performance optimization
COPY ./ui/package.json ./

# Installs all node packages. Cached unless package.json changes
RUN yarn install

# Copies everything else over to Docker environment
# node_modules excluded in .dockerignore.
# node_modules excluded in .dockerignore.
COPY ./ui .

CMD [ "yarn", "start" ]

0 comments on commit abb08a7

Please sign in to comment.