diff --git a/doods/README.md b/doods/README.md index e487b0a..746285c 100644 --- a/doods/README.md +++ b/doods/README.md @@ -6,19 +6,23 @@ doods ## docker-stack.yaml ```yaml -version: "3.7" +version: "3.8" services: doods: - image: snowzach/doods:rpi + image: snowzach/doods:arm32 ports: - "8080:8080" configs: - source: config.yaml target: /opt/doods/config.yaml deploy: - replicas: 3 + replicas: 2 + placement: + max_replicas_per_node: 1 + constraints: + - node.role == worker restart_policy: condition: on-failure @@ -32,9 +36,9 @@ configs: ``` $ docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION -x1ytchflr5hx8od91d8sospdm * pi1 Ready Active Leader 19.03.5 -fa4q2xzyiggqrdp899umsb0bi pi2 Ready Active 19.03.5 -qyfzcl94hxeatjj1qk03ip41n pi3 Ready Active 19.03.5 +oy7dhxijdatpj8v6zntsin8l0 * pi1 Ready Active Leader 19.03.12 +7hkc4r7pr0mjpzxbei2y92voe pi2 Ready Active 19.03.12 +rcp67rotibho0qxfdnpqwx71l pi3 Ready Active 19.03.12 $ docker stack deploy -c docker-stack.yml doods Creating network doods_default @@ -42,7 +46,7 @@ Creating config doods_config.yaml Creating service doods_doods $ curl http://127.0.0.1:8080/version -{"version":"v0.1.5-0-g99f5768"} +{"version":"v0.2.2-0-gf87b48e-dirty"} $ curl http://127.0.0.1:8080/detectors { @@ -65,6 +69,8 @@ $ curl http://127.0.0.1:8080/detectors ] } +$ jq -n --arg data $(base64 -w0 image.jpg) '.detector_name="default" | .detect["*"]=50 | .data=$data' > data.json + $ cat data.json { "detector_name": "default", @@ -74,6 +80,8 @@ $ cat data.json } } +$ base64 -w0 image.jpg | http -I http://127.0.0.1:8080/detect detector_name=default detect:='{"*":50}' data=@/dev/stdin + $ curl -X POST -H Content-Type:application/json http://127.0.0.1:8080/detect -d @data.json { "detections": [ diff --git a/doods/arm/docker-compose.yml b/doods/arm/docker-compose.yml index 80cb8da..c255732 100644 --- a/doods/arm/docker-compose.yml +++ b/doods/arm/docker-compose.yml @@ -1,5 +1,5 @@ doods: - image: snowzach/doods:rpi + image: snowzach/doods:arm32 ports: - "8080:8080" restart: unless-stopped diff --git a/doods/arm/docker-stack.yml b/doods/arm/docker-stack.yml index b48278c..358360f 100644 --- a/doods/arm/docker-stack.yml +++ b/doods/arm/docker-stack.yml @@ -1,16 +1,20 @@ -version: "3.7" +version: "3.8" services: doods: - image: snowzach/doods:rpi + image: snowzach/doods:arm32 ports: - "8080:8080" configs: - source: config.yaml target: /opt/doods/config.yaml deploy: - replicas: 3 + replicas: 2 + placement: + max_replicas_per_node: 1 + constraints: + - node.role == worker restart_policy: condition: on-failure diff --git a/doods/docker-compose.yml b/doods/docker-compose.yml index 53138a9..04d6a9b 100644 --- a/doods/docker-compose.yml +++ b/doods/docker-compose.yml @@ -1,5 +1,5 @@ doods: - image: snowzach/doods + image: snowzach/doods:amd64 ports: - "8080:8080" restart: unless-stopped diff --git a/openmeetings/docker-compose.yml b/openmeetings/docker-compose.yml index 37d1cf1..26fb71c 100644 --- a/openmeetings/docker-compose.yml +++ b/openmeetings/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.8' services: openmeetings: - image: apache/openmeetings:min-5.0.0-M4 + image: apache/openmeetings:min-5.0.0 ports: - "5080:5080" volumes: diff --git a/superset/arm/Dockerfile b/superset/arm/Dockerfile index 64f3371..fb9f604 100644 --- a/superset/arm/Dockerfile +++ b/superset/arm/Dockerfile @@ -6,18 +6,19 @@ FROM arm32v7/debian:buster MAINTAINER EasyPi Software Foundation # Configure environment -ENV SUPERSET_VERSION=0.36.0 \ +ENV SUPERSET_VERSION=0.37.0 \ SUPERSET_REPO=apache/incubator-superset \ SUPERSET_HOME=/var/lib/superset \ - PYTHONPATH=/etc/superset:/home/superset:$PYTHONPATH + PYTHONPATH=/etc/superset:/home/superset:$PYTHONPATH \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 ENV GUNICORN_BIND=0.0.0.0:8088 \ GUNICORN_LIMIT_REQUEST_FIELD_SIZE=0 \ GUNICORN_LIMIT_REQUEST_LINE=0 \ GUNICORN_TIMEOUT=60 \ - GUNICORN_WORKERS=2 \ - LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 -ENV GUNICORN_CMD_ARGS="-w${GUNICORN_WORKERS} -t${GUNICORN_TIMEOUT} -b${GUNICORN_BIND} --limit-request-line=0 --limit-request-field_size=0" + GUNICORN_WORKERS=3 \ + GUNICORN_THREADS=4 +ENV GUNICORN_CMD_ARGS="--workers ${GUNICORN_WORKERS} --threads ${GUNICORN_THREADS} --timeout ${GUNICORN_TIMEOUT} --bind ${GUNICORN_BIND} --limit-request-line ${GUNICORN_LIMIT_REQUEST_LINE} --limit-request-field_size ${GUNICORN_LIMIT_REQUEST_FIELD_SIZE}" # Create superset user & install dependencies RUN set -xe \ @@ -74,7 +75,7 @@ VOLUME /home/superset \ /var/lib/superset WORKDIR /home/superset -# Deploy application +# Finalize application EXPOSE 8088 HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"] CMD ["gunicorn", "superset:app"] diff --git a/superset/docker-compose.yml b/superset/docker-compose.yml index 22fddb8..2c00be3 100644 --- a/superset/docker-compose.yml +++ b/superset/docker-compose.yml @@ -20,7 +20,7 @@ services: restart: unless-stopped superset: - image: amancevice/superset:0.36.0 + image: amancevice/superset:0.37.0 ports: - "8088:8088" volumes: @@ -33,7 +33,7 @@ services: restart: unless-stopped worker: - image: amancevice/superset:0.36.0 + image: amancevice/superset:0.37.0 command: celery worker volumes: - ./data/superset:/etc/superset diff --git a/superset/systemd/superset b/superset/systemd/superset index 8b8870f..88096b9 100644 --- a/superset/systemd/superset +++ b/superset/systemd/superset @@ -1,3 +1,3 @@ PYTHONPATH=/home/superset/superset SUPERSET_HOME=/home/superset/superset -GUNICORN_CMD_ARGS="--workers=4 --timeout=60 --bind=0.0.0.0:8088 --limit-request-line=0 --limit-request-field_size=0" +GUNICORN_CMD_ARGS="--workers=4 --threads=4 --timeout=60 --bind=0.0.0.0:8088 --limit-request-line=0 --limit-request-field_size=0"