-
-
Notifications
You must be signed in to change notification settings - Fork 589
feat(server): add a self-hostable projects API and collaboration relay #1690
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d8fccef
feat(server): add a self-hostable projects API and collaboration relay
giswqs 40008ab
fix(server): unbreak the Docker stack found by an end-to-end run
giswqs 7d1c7c6
Address Copilot, Claude, and CodeRabbit review feedback
giswqs 7e6a52e
Address CodeRabbit review feedback
giswqs b498b70
Address Claude review feedback
giswqs da41e9b
Address CodeRabbit review feedback
giswqs fc7592c
Address CodeRabbit review feedback
giswqs 63a2c8e
Address Claude review feedback
giswqs ee5544b
Address CodeRabbit review feedback
giswqs ab4571c
Address Claude review feedback
giswqs f12b48b
style: auto-format (ruff + oxfmt) [pre-commit.ci]
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .venv/ | ||
| .pytest_cache/ | ||
| __pycache__/ | ||
| tests/ | ||
| *.db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| geolibre-server-api.db | ||
| data/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| FROM python:3.13-slim | ||
|
|
||
| WORKDIR /app | ||
| COPY pyproject.toml README.md ./ | ||
| COPY geolibre_server_api ./geolibre_server_api | ||
| RUN pip install --no-cache-dir ".[postgres,s3]" | ||
|
|
||
| RUN useradd --create-home geolibre && mkdir -p /data && chown geolibre:geolibre /data | ||
| USER geolibre | ||
|
|
||
| ENV GEOLIBRE_DATABASE_URL=sqlite:////data/geolibre-server-api.db \ | ||
| GEOLIBRE_STORAGE_PATH=/data/objects | ||
| EXPOSE 8000 | ||
| CMD ["geolibre-server-api"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # GeoLibre server API | ||
|
|
||
| Reference implementation of [`docs/server-api.md`](../../docs/server-api.md). | ||
| It is a separate multi-user service from the local desktop processing sidecar. | ||
|
|
||
| ```bash | ||
| pip install -e ".[test]" | ||
| geolibre-server-api | ||
| ``` | ||
|
|
||
| Configuration: | ||
|
|
||
| - `GEOLIBRE_DATABASE_URL`: SQLAlchemy URL; defaults to | ||
| `sqlite:///./geolibre-server-api.db`. Use | ||
| `postgresql+psycopg://user:password@host/database` with the `postgres` extra. | ||
| - `GEOLIBRE_STORAGE_PATH`: local object directory, default `./data`. | ||
| - `GEOLIBRE_STORAGE=s3`, `GEOLIBRE_S3_BUCKET`, and optional | ||
| `GEOLIBRE_S3_ENDPOINT` / `GEOLIBRE_S3_REGION`: S3-compatible storage (install | ||
| the `s3` extra; standard AWS credential environment variables apply). | ||
| - `GEOLIBRE_PUBLIC_URL`: externally reachable API origin. | ||
| - `GEOLIBRE_VIEWER_URL`: GeoLibre viewer origin. | ||
| - `GEOLIBRE_CORS_ORIGINS`: comma-separated web origins, default `*`. | ||
| - `GEOLIBRE_MAX_PROJECT_BYTES`, `GEOLIBRE_MAX_THUMBNAIL_BYTES`: upload limits. | ||
|
giswqs marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| """GeoLibre projects and identity reference server.""" | ||
|
|
||
| from .main import create_app | ||
|
|
||
| __all__ = ["create_app"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.