Skip to content

Commit

Permalink
build: separate odm compose from main file
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Aug 2, 2024
1 parent 08a8ce2 commit 7c99587
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 68 deletions.
74 changes: 74 additions & 0 deletions docker-compose.odm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
networks:
dtm-network:
name: dtm-network

volumes:
odm-media:
odm-db-data:

services:
odm-db:
image: docker.io/opendronemap/webodm_db:latest
container_name: odm-db
volumes:
- odm-db-data:/var/lib/postgresql/data:Z
ports:
- 5999:5432
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: -100

odm-api:
image: docker.io/opendronemap/nodeodm:3.5.3
# This is hardcoded by default
hostname: webodm-node-odm-1
container_name: odm-api
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: 500

odm-web:
image: docker.io/opendronemap/webodm_webapp:2.5.4
container_name: odm-web
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-postgres.sh odm-db /webodm/wait-for-it.sh -t 0 odm-broker:6379 -- /webodm/start.sh\""
volumes:
- odm-media:/webodm/app/media:z
ports:
- "${WO_PORT}:8000"
depends_on:
odm-worker:
condition: service_started
env_file:
- .env
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: 0

odm-broker:
image: docker.io/redis:7.0.10
container_name: odm-broker
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: -500

odm-worker:
image: docker.io/opendronemap/webodm_webapp:2.5.4
container_name: odm-worker
entrypoint: /bin/bash -c "/webodm/wait-for-postgres.sh odm-db /webodm/wait-for-it.sh -t 0 odm-broker:6379 -- /webodm/wait-for-it.sh -t 0 odm-web:8000 -- /webodm/worker.sh start"
volumes:
- odm-media:/webodm/app/media:z
depends_on:
odm-db:
condition: service_started
odm-broker:
condition: service_started
env_file:
- .env
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: 250
68 changes: 0 additions & 68 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ networks:
volumes:
db-data:
name: drone-tm-db-data
odm-media:
odm-db-data:

services:
backend:
Expand Down Expand Up @@ -104,69 +102,3 @@ services:
- dtm-network
entrypoint: ["pdm", "run", "alembic", "upgrade", "head"]
restart: "no"

odm-db:
image: docker.io/opendronemap/webodm_db:latest
container_name: odm-db
volumes:
- odm-db-data:/var/lib/postgresql/data:Z
ports:
- 5999:5432
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: -100

odm-api:
image: docker.io/opendronemap/nodeodm:3.5.3
# This is hardcoded by default
hostname: webodm-node-odm-1
container_name: odm-api
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: 500

odm-web:
image: docker.io/opendronemap/webodm_webapp:2.5.4
container_name: odm-web
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-postgres.sh odm-db /webodm/wait-for-it.sh -t 0 odm-broker:6379 -- /webodm/start.sh\""
volumes:
- odm-media:/webodm/app/media:z
ports:
- "${WO_PORT}:8000"
depends_on:
odm-worker:
condition: service_started
env_file:
- .env
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: 0

odm-broker:
image: docker.io/redis:7.0.10
container_name: odm-broker
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: -500

odm-worker:
image: docker.io/opendronemap/webodm_webapp:2.5.4
container_name: odm-worker
entrypoint: /bin/bash -c "/webodm/wait-for-postgres.sh odm-db /webodm/wait-for-it.sh -t 0 odm-broker:6379 -- /webodm/wait-for-it.sh -t 0 odm-web:8000 -- /webodm/worker.sh start"
volumes:
- odm-media:/webodm/app/media:z
depends_on:
odm-db:
condition: service_started
odm-broker:
condition: service_started
env_file:
- .env
networks:
- dtm-network
restart: unless-stopped
oom_score_adj: 250

0 comments on commit 7c99587

Please sign in to comment.