Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ADDING COMPOSE#7208

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
elshan2000 wants to merge7 commits intoProject-OSRM:master
base:master
Choose a base branch
Loading
fromelshan2000:add-docker-compose

Conversation

@elshan2000
Copy link

@elshan2000elshan2000 commentedJul 8, 2025
edited
Loading

Issue

What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.

Please read ourdocumentation on release and version management.
If your PR is still work in progress please attach the relevant label.

Tasklist

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

Copy link
Author

@elshan2000elshan2000 left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Docker Compose Setup for Project OSRM

This directory contains aDocker Compose configuration to simplify running [Project OSRM](https://github.com/Project-OSRM/osrm-backend).

With this way:

  • Only use docker compose up -d  
  • It launches afrontend service with health checks.
  • Don't need to ensure services start in the correct order.

📂 Directory Structure

osrm-backend/├── docker-compose.yml├── prepare_osrm.sh

Quick Start

Clone this repository

git clone https://github.com/elshan2000/osrm-backend.gitcd osrm-backend

How It Works

Init Service

  • Checks for the marker fileosrm_is_created.

  • If not present, runs:

    • osrm-extract
    • osrm-partition
    • osrm-customize
  • Creates the marker file.

  • Exits after preparation.

Backend Service

  • Depends on thefrontend healthcheck.
  • Startsosrm-routed serving prepared data.

Frontend Service

  • Periodically checks for the presence of the marker fileosrm_is_created.
  • Reportshealthy when the preparation is complete.
  • This readiness allows the backend service to start safely.

Health Check Logic

Thefrontend container performs a health check by verifying:

/data/osrm_is_created

Once the file exists, the health check reportshealthy. This ensures that:

✅ Data preparation is complete before routing starts.


Clean Up

To stop and remove all containers:

docker compose down

To force re-preparation of the data (for example, if you want to regenerate.osrm files):

docker compose downrm ./data/osrm_is_createddocker compose up -d

Contribution

This Docker Compose configuration was contributed by [elshan2000](https://github.com/elshan2000).

Feel free to open issues or submit improvements!


License

This project follows the [Project OSRM](https://github.com/Project-OSRM/osrm-backend) license (BSD-2-Clause).

Copy link
Collaborator

@DennisOSRMDennisOSRM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I wonder if README2 ist the right name for the file. The content seems good, tho.

elshan2000 reacted with thumbs up emoji
@elshan2000
Copy link
Author

I wonder if README2 ist the right name for the file. The content seems good, tho.

i can move this readme to docker_compose directory
so can you verify this compose setting for this project?
thanks.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@DennisOSRMDennisOSRMDennisOSRM left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@elshan2000@DennisOSRM

[8]ページ先頭

©2009-2025 Movatter.jp