1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 11:58:47 +00:00

update doods

This commit is contained in:
kev 2020-09-15 13:00:51 +08:00
parent 312555027e
commit 17ff2e4ddc
8 changed files with 36 additions and 23 deletions

@ -6,19 +6,23 @@ doods
## docker-stack.yaml ## docker-stack.yaml
```yaml ```yaml
version: "3.7" version: "3.8"
services: services:
doods: doods:
image: snowzach/doods:rpi image: snowzach/doods:arm32
ports: ports:
- "8080:8080" - "8080:8080"
configs: configs:
- source: config.yaml - source: config.yaml
target: /opt/doods/config.yaml target: /opt/doods/config.yaml
deploy: deploy:
replicas: 3 replicas: 2
placement:
max_replicas_per_node: 1
constraints:
- node.role == worker
restart_policy: restart_policy:
condition: on-failure condition: on-failure
@ -32,9 +36,9 @@ configs:
``` ```
$ docker node ls $ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
x1ytchflr5hx8od91d8sospdm * pi1 Ready Active Leader 19.03.5 oy7dhxijdatpj8v6zntsin8l0 * pi1 Ready Active Leader 19.03.12
fa4q2xzyiggqrdp899umsb0bi pi2 Ready Active 19.03.5 7hkc4r7pr0mjpzxbei2y92voe pi2 Ready Active 19.03.12
qyfzcl94hxeatjj1qk03ip41n pi3 Ready Active 19.03.5 rcp67rotibho0qxfdnpqwx71l pi3 Ready Active 19.03.12
$ docker stack deploy -c docker-stack.yml doods $ docker stack deploy -c docker-stack.yml doods
Creating network doods_default Creating network doods_default
@ -42,7 +46,7 @@ Creating config doods_config.yaml
Creating service doods_doods Creating service doods_doods
$ curl http://127.0.0.1:8080/version $ 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 $ 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 $ cat data.json
{ {
"detector_name": "default", "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 $ curl -X POST -H Content-Type:application/json http://127.0.0.1:8080/detect -d @data.json
{ {
"detections": [ "detections": [

@ -1,5 +1,5 @@
doods: doods:
image: snowzach/doods:rpi image: snowzach/doods:arm32
ports: ports:
- "8080:8080" - "8080:8080"
restart: unless-stopped restart: unless-stopped

@ -1,16 +1,20 @@
version: "3.7" version: "3.8"
services: services:
doods: doods:
image: snowzach/doods:rpi image: snowzach/doods:arm32
ports: ports:
- "8080:8080" - "8080:8080"
configs: configs:
- source: config.yaml - source: config.yaml
target: /opt/doods/config.yaml target: /opt/doods/config.yaml
deploy: deploy:
replicas: 3 replicas: 2
placement:
max_replicas_per_node: 1
constraints:
- node.role == worker
restart_policy: restart_policy:
condition: on-failure condition: on-failure

@ -1,5 +1,5 @@
doods: doods:
image: snowzach/doods image: snowzach/doods:amd64
ports: ports:
- "8080:8080" - "8080:8080"
restart: unless-stopped restart: unless-stopped

@ -3,7 +3,7 @@ version: '3.8'
services: services:
openmeetings: openmeetings:
image: apache/openmeetings:min-5.0.0-M4 image: apache/openmeetings:min-5.0.0
ports: ports:
- "5080:5080" - "5080:5080"
volumes: volumes:

@ -6,18 +6,19 @@ FROM arm32v7/debian:buster
MAINTAINER EasyPi Software Foundation MAINTAINER EasyPi Software Foundation
# Configure environment # Configure environment
ENV SUPERSET_VERSION=0.36.0 \ ENV SUPERSET_VERSION=0.37.0 \
SUPERSET_REPO=apache/incubator-superset \ SUPERSET_REPO=apache/incubator-superset \
SUPERSET_HOME=/var/lib/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 \ ENV GUNICORN_BIND=0.0.0.0:8088 \
GUNICORN_LIMIT_REQUEST_FIELD_SIZE=0 \ GUNICORN_LIMIT_REQUEST_FIELD_SIZE=0 \
GUNICORN_LIMIT_REQUEST_LINE=0 \ GUNICORN_LIMIT_REQUEST_LINE=0 \
GUNICORN_TIMEOUT=60 \ GUNICORN_TIMEOUT=60 \
GUNICORN_WORKERS=2 \ GUNICORN_WORKERS=3 \
LANG=C.UTF-8 \ GUNICORN_THREADS=4
LC_ALL=C.UTF-8 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}"
ENV GUNICORN_CMD_ARGS="-w${GUNICORN_WORKERS} -t${GUNICORN_TIMEOUT} -b${GUNICORN_BIND} --limit-request-line=0 --limit-request-field_size=0"
# Create superset user & install dependencies # Create superset user & install dependencies
RUN set -xe \ RUN set -xe \
@ -74,7 +75,7 @@ VOLUME /home/superset \
/var/lib/superset /var/lib/superset
WORKDIR /home/superset WORKDIR /home/superset
# Deploy application # Finalize application
EXPOSE 8088 EXPOSE 8088
HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"] HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"]
CMD ["gunicorn", "superset:app"] CMD ["gunicorn", "superset:app"]

@ -20,7 +20,7 @@ services:
restart: unless-stopped restart: unless-stopped
superset: superset:
image: amancevice/superset:0.36.0 image: amancevice/superset:0.37.0
ports: ports:
- "8088:8088" - "8088:8088"
volumes: volumes:
@ -33,7 +33,7 @@ services:
restart: unless-stopped restart: unless-stopped
worker: worker:
image: amancevice/superset:0.36.0 image: amancevice/superset:0.37.0
command: celery worker command: celery worker
volumes: volumes:
- ./data/superset:/etc/superset - ./data/superset:/etc/superset

@ -1,3 +1,3 @@
PYTHONPATH=/home/superset/superset PYTHONPATH=/home/superset/superset
SUPERSET_HOME=/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"