Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenDroneMap to docker compose stack #116

Merged
merged 5 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .env.sample → .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,22 @@ SMTP_HOST=smtp.gmail.com
SMTP_USER=xxx@gmail.com
SMTP_PASSWORD=xxxxxxxxxx
EMAILS_FROM_EMAIL=xxxxxxxx@gmail.com

# ODM
WO_ADMIN_PASSWORD=password
WO_HOST=localhost
WO_PORT=9900
WO_DATABASE_HOST=odm-db
# WO_DATABASE_NAME=webodm_dev
# WO_DATABASE_PASSWORD=postgres
# WO_DATABASE_USER=postgres
WO_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
WO_SSL=NO
WO_SSL_KEY=
WO_SSL_CERT=
WO_SSL_INSECURE_PORT_REDIRECT=80
WO_DEBUG=NO
WO_DEV=NO
WO_BROKER=redis://odm-broker
WO_DEFAULT_NODES=1
WO_SETTINGS=
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# uses: hotosm/gh-workflows/.github/workflows/openapi_build.yml@1.6.0
# with:
# image: ghcr.io/${{ github.repository }}/backend:ci-${{ github.ref_name }}
# example_env_file_path: ".env.sample"
# example_env_file_path: ".env.example"
# output_path: docs/openapi.json

publish_docs:
Expand Down
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
2 changes: 1 addition & 1 deletion src/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

1. Do not use npm to install packages, use yarn. If you want to run `npm install` then delete the `yarn.lock` file and install the packages using npm.

2. Create a .env file and copy .env.sample to .env
2. Create a .env file and copy .env.example to .env

3. Run `yarn dev` to start the development server.

Expand Down
Loading