Skip to content

Commit

Permalink
updated docker-compose files to version 3.4, fixing broken file due t…
Browse files Browse the repository at this point in the history
…o "logging" only being available in version "3"

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
  • Loading branch information
thjaeckle committed Dec 22, 2023
1 parent 9f0138b commit d01c237
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 35 deletions.
55 changes: 41 additions & 14 deletions deployment/docker/docker-compose.yml
Expand Up @@ -8,12 +8,15 @@
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
version: '2.4'
version: '3.4'

services:
mongodb:
image: docker.io/mongo:5.0
mem_limit: 256m
deploy:
resources:
limits:
memory: 256m
restart: always
networks:
default:
Expand All @@ -31,7 +34,10 @@ services:

policies:
image: docker.io/eclipse/ditto-policies:${DITTO_VERSION:-latest}
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
restart: always
networks:
default:
Expand Down Expand Up @@ -61,7 +67,10 @@ services:

things:
image: docker.io/eclipse/ditto-things:${DITTO_VERSION:-latest}
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
restart: always
networks:
default:
Expand Down Expand Up @@ -93,7 +102,10 @@ services:

things-search:
image: docker.io/eclipse/ditto-things-search:${DITTO_VERSION:-latest}
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
restart: always
networks:
default:
Expand Down Expand Up @@ -125,7 +137,10 @@ services:

connectivity:
image: docker.io/eclipse/ditto-connectivity:${DITTO_VERSION:-latest}
mem_limit: 768m
deploy:
resources:
limits:
memory: 768m
restart: always
networks:
default:
Expand Down Expand Up @@ -158,7 +173,10 @@ services:

gateway:
image: docker.io/eclipse/ditto-gateway:${DITTO_VERSION:-latest}
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
restart: always
networks:
default:
Expand Down Expand Up @@ -188,21 +206,27 @@ services:
timeout: 15s
retries: 4
start_period: 120s
logging:
logging:
options:
max-size: 50m

ditto-ui:
image: docker.io/eclipse/ditto-ui:${DITTO_VERSION:-latest}
mem_limit: 32m
deploy:
resources:
limits:
memory: 32m
restart: always
logging:
options:
max-size: 50m
max-size: 10m

swagger-ui:
image: docker.io/swaggerapi/swagger-ui:v5.9.1
mem_limit: 32m
deploy:
resources:
limits:
memory: 32m
restart: always
environment:
- QUERY_CONFIG_ENABLED=true
Expand All @@ -213,11 +237,14 @@ services:
command: nginx -g 'daemon off;'
logging:
options:
max-size: 50m
max-size: 10m

nginx:
image: docker.io/nginx:1.21-alpine
mem_limit: 32m
deploy:
resources:
limits:
memory: 32m
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
Expand All @@ -234,7 +261,7 @@ services:
- swagger-ui
logging:
options:
max-size: 50m
max-size: 10m

volumes:
ditto_log_files:
Expand Down
102 changes: 81 additions & 21 deletions deployment/docker/sandbox/docker-compose.yml
Expand Up @@ -8,13 +8,16 @@
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
version: '2.4'
version: '3.4'

services:
mongodb:
image: docker.io/mongo:5.0
mem_limit: 256m
cpu_shares: 100
deploy:
resources:
limits:
cpus: '0.1'
memory: 256m
restart: always
networks:
default:
Expand All @@ -24,12 +27,18 @@ services:
volumes:
- "/opt/docker-volumes/mongo-data:/data/db"
environment:
TZ: Europe/Berlin
TZ: Europe/Berlin
logging:
options:
max-size: 50m

policies:
image: docker.io/eclipse/ditto-policies:${DITTO_VERSION:-latest}
mem_limit: 512m
cpu_shares: 200
deploy:
resources:
limits:
cpus: '0.2'
memory: 512m
restart: always
networks:
default:
Expand All @@ -46,11 +55,17 @@ services:
timeout: 15s
retries: 4
start_period: 300s
logging:
options:
max-size: 50m

things:
image: docker.io/eclipse/ditto-things:${DITTO_VERSION:-latest}
mem_limit: 512m
cpu_shares: 200
deploy:
resources:
limits:
cpus: '0.2'
memory: 512m
restart: always
networks:
default:
Expand All @@ -71,11 +86,17 @@ services:
timeout: 15s
retries: 4
start_period: 300s
logging:
options:
max-size: 50m

things-search:
image: docker.io/eclipse/ditto-things-search:${DITTO_VERSION:-latest}
mem_limit: 512m
cpu_shares: 200
deploy:
resources:
limits:
cpus: '0.2'
memory: 512m
restart: always
networks:
default:
Expand All @@ -94,11 +115,17 @@ services:
timeout: 15s
retries: 4
start_period: 300s
logging:
options:
max-size: 50m

# connectivity:
# image: docker.io/eclipse/ditto-connectivity:${DITTO_VERSION:-latest}
# mem_limit: 768m
# cpu_shares: 300
# deploy:
# resources:
# limits:
# cpus: '0.3'
# memory: 768m
# restart: always
# networks:
# default:
Expand All @@ -119,11 +146,17 @@ services:
# timeout: 15s
# retries: 4
# start_period: 300s
# logging:
# options:
# max-size: 50m

gateway:
image: docker.io/eclipse/ditto-gateway:${DITTO_VERSION:-latest}
mem_limit: 512m
cpu_shares: 200
deploy:
resources:
limits:
cpus: '0.2'
memory: 512m
restart: always
networks:
default:
Expand Down Expand Up @@ -151,23 +184,38 @@ services:
timeout: 15s
retries: 4
start_period: 300s
logging:
options:
max-size: 50m

ditto-ui:
image: docker.io/eclipse/ditto-ui:${DITTO_VERSION:-latest}
mem_limit: 32m
cpu_shares: 50
deploy:
resources:
limits:
cpus: '0.05'
memory: 32m
restart: always
logging:
options:
max-size: 10m

swagger-ui:
image: docker.io/swaggerapi/swagger-ui:v5.9.1
mem_limit: 32m
cpu_shares: 50
deploy:
resources:
limits:
cpus: '0.05'
memory: 32m
restart: always
volumes:
- ../../../documentation/src/main/resources/openapi:/usr/share/nginx/html/openapi:ro
- ../../../documentation/src/main/resources/images:/usr/share/nginx/html/images:ro
- ../swagger3-index.html:/usr/share/nginx/html/index.html:ro
command: nginx -g 'daemon off;'
logging:
options:
max-size: 10m

# node-red:
# image: docker.io/nodered/node-red-docker:latest
Expand All @@ -179,8 +227,11 @@ services:

nginx:
image: docker.io/nginx:1.21-alpine
mem_limit: 32m
cpu_shares: 100
deploy:
resources:
limits:
cpus: '0.05'
memory: 32m
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
Expand All @@ -207,14 +258,23 @@ services:
timeout: 15s
retries: 60
start_period: 120s
logging:
options:
max-size: 10m

autoheal:
image: willfarrell/autoheal
mem_limit: 32m
deploy:
resources:
limits:
memory: 32m
restart: always
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
environment:
- AUTOHEAL_CONTAINER_LABEL=all
- AUTOHEAL_INTERVAL=10
- CURL_TIMEOUT=30
logging:
options:
max-size: 10m

0 comments on commit d01c237

Please sign in to comment.