-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Hi,
I like to have my nodeODM setup simple without additional maintenance start and stop scripts - just a docker compose file and thats it.
I guess there is also demand from other users with the same demand.
I am using GPU, but removing the GPU part should not be a problem as well.
I therefore created a simple setup using upstream database container and the published docker containers:
services:
webodm-node-odm-1:
image: opendronemap/nodeodm:gpu
container_name: webodm-node-odm-1
ports:
- "3000:3000"
volumes:
- ./config-default.json:/var/www/config-default.json
privileged: true
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
webapp-odm:
image: opendronemap/webodm_webapp
container_name: webapp
entrypoint: /bin/bash -c "service cron start && chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-it.sh -t 0 redis-odm:6379 -- /webodm/start.sh\" && python manage.py migrate"
volumes:
- ./data/webodm:/webodm/app/media:z
ports:
- "8080:8000"
depends_on:
- db-odm
- redis-odm
- webodm-node-odm-1
environment:
- WO_BROKER=redis://redis-odm
- WO_DEFAULT_NODES=1
- WO_HOST=localhost
- WO_PORT=8000
- WO_MEDIA_DIR=appmedia
- WO_DB_DIR=dbdata
- WO_SSL=NO
- WO_SSL_INSECURE_PORT_REDIRECT=80
- WO_DATABASE_HOST=db-odm
- WO_DATABASE_NAME=webodm_dev
- WO_DATABASE_USER=postgres
- WO_DATABASE_PASSWORD=postgres
redis-odm:
image: redis:alpine
container_name: redis-odm
restart: always
db-odm:
image: postgis/postgis:17-3.5-alpine
container_name: db-odm
restart: always
volumes:
- ./data/odm-db:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=webodm_dev
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "webodm_dev", "-U", "postgres"]
timeout: 45s
interval: 20s
retries: 5
worker:
image: opendronemap/webodm_webapp
container_name: worker
entrypoint: /bin/bash -c "/webodm/wait-for-it.sh -t 0 redis-odm:6379 -- /webodm/wait-for-it.sh -t 0 webapp-odm:8000 -- /webodm/worker.sh start"
volumes:
- ./data/webodm:/webodm/app/media:z
depends_on:
- redis-odm
- db-odm
environment:
- WO_BROKER=redis://redis-odm
- WO_DATABASE_HOST=db-odm
- WO_DATABASE_NAME=webodm_dev
- WO_DATABASE_USER=postgres
- WO_DATABASE_PASSWORD=postgres
The content of the init.sql is
CREATE EXTENSION postgis_raster;
SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';
and the ODM worker default config is as follows:
{
"instance": "node-OpenDroneMap",
"odm_path": "/code",
"logger": {
"level": "info",
"maxFileSize": 104857600,
"maxFiles": 10,
"logDirectory": ""
},
"port": "auto",
"deamon": false,
"parallelQueueProcessing": 8,
"cleanupTasksAfter": 2880,
"test": false,
"testSkipOrthophotos": false,
"testSkipDems": false,
"token": "",
"authorizedIps": [],
"maxImages": ""
}
This works well to just run docker compose up -d
.
Would it be possible to add docs about this use case as well? Or is the webodm.sh
the only supported way to run the software?
lhallmann