-
Notifications
You must be signed in to change notification settings - Fork 66
Improve documentation and usability of running a Tiled server #1313
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
Open
danielballan
wants to merge
32
commits into
bluesky:main
Choose a base branch
from
danielballan:server-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
9a210b5
Add user guide on simple server.
danielballan 4ae00a1
Add section on readable storage
danielballan 6411817
WIP server docs
danielballan cc8191b
Introduce 'catalog' config as alternative to 'trees'
danielballan d5a01df
Use dedicated config file for Containerfile
danielballan cc38ba5
WIP: docker-compse with PG and Redis
danielballan 4b121b2
Fix order validators run in
danielballan 73be7ad
Document docker-compose
danielballan 49cad30
Include .env file explanation
danielballan 7703e7d
Remove stray line
danielballan fd76284
Improve wording
danielballan caac448
Update location of monitoring compose file
danielballan 8b8f849
cleanup
danielballan 21fd70b
Make catalog and storage databases in PG
danielballan 2ed92e0
Consistently use BaseSettings for all config models.
danielballan 22c0985
Use 'secret' as valid placeholder.
danielballan 0fcb431
Fix model validation issues with catalog and trees
danielballan 99dc593
Config tests pass
danielballan eeda695
Test was testing invalid config. Fix it.
danielballan 0b3215e
Expand comment explaining database creation.
danielballan f53825f
Add compose override example
danielballan a56977b
Consitent env var priority
danielballan 22b378a
More details in docs
danielballan 05f5b2b
First pass at single-node deployment complete
danielballan ba12d2d
Expose port
danielballan a89d39c
More comments on config.
danielballan 0af7de7
Highlight the testing instructions at the top.
danielballan b7ad439
Fix path and use explicit scheme
danielballan 7b1c664
Stub multi-node page and address warnings.
danielballan fabf738
Make persistent storage work smoothly for podman/docker.
danielballan e2086ff
More comments
danielballan 30afcef
Add comprehensive server configuration example
danielballan 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| TILED_SINGLE_USER_API_KEY=secret | ||
| POSTGRES_PASSWORD=secret | ||
| REDIS_PASSWORD=secret |
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,74 @@ | ||
| --- | ||
| services: | ||
| tiled: | ||
| build: | ||
| context: . | ||
| dockerfile: Containerfile | ||
| environment: | ||
| - TILED_SINGLE_USER_API_KEY=${TILED_SINGLE_USER_API_KEY} | ||
| - TILED_CATALOG_URI=postgresql://tiled:${POSTGRES_PASSWORD}@postgres:5432/tiled_catalog | ||
| - TILED_CATALOG_WRITABLE_STORAGE=["file:///storage", "postgresql://tiled:${POSTGRES_PASSWORD}@postgres:5432/tiled_storage"] | ||
| - TILED_STREAMING_CACHE_URI=redis://:${REDIS_PASSWORD}@redis:6379 | ||
| volumes: | ||
| - tiled_data:/storage | ||
| ports: | ||
| - 8000:8000 | ||
| restart: unless-stopped | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| redis: | ||
| condition: service_healthy | ||
| networks: | ||
| - backend | ||
| healthcheck: | ||
| test: curl --fail http://localhost:8000/healthz || exit 1 | ||
| interval: 60s | ||
| timeout: 10s | ||
| retries: 3 | ||
| start_period: 30s | ||
|
|
||
| postgres: | ||
| image: docker.io/postgres:16 | ||
| environment: | ||
| - POSTGRES_USER=tiled | ||
| - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
| # We create two databases, 'tiled_catalog' (metadata) and | ||
| # 'tiled_storage' (tabular data) below. But it is required to | ||
| # specify one here, so we use 'postgres' as a neutral default. | ||
| - POSTGRES_DB=postgres | ||
| volumes: | ||
| - postgres_data:/var/lib/postgresql/data | ||
| - ./initdb:/docker-entrypoint-initdb.d | ||
| restart: unless-stopped | ||
| networks: | ||
| - backend | ||
| healthcheck: | ||
| test: pg_isready -U tiled -d postgres | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 10s | ||
|
|
||
| redis: | ||
| image: docker.io/redis:7-alpine | ||
| command: redis-server --requirepass ${REDIS_PASSWORD} | ||
| volumes: | ||
| - redis_data:/data | ||
| restart: unless-stopped | ||
| networks: | ||
| - backend | ||
| healthcheck: | ||
| test: redis-cli -a ${REDIS_PASSWORD} ping | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 5s | ||
|
|
||
| volumes: | ||
| tiled_data: | ||
| postgres_data: | ||
| redis_data: | ||
|
|
||
| networks: | ||
| backend: {} |
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,7 @@ | ||
| --- | ||
| services: | ||
| tiled: | ||
| environment: | ||
| - TILED_CONFIG=/deploy/config | ||
| volumes: | ||
| - ./my-custom-config-dir:/deploy/config:ro |
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,72 @@ | ||
| --- | ||
| services: | ||
| tiled: | ||
| image: ghcr.io/bluesky/tiled:0.2.8 | ||
| environment: | ||
| - TILED_SINGLE_USER_API_KEY=${TILED_SINGLE_USER_API_KEY} | ||
| - TILED_CATALOG_URI=postgresql://tiled:${POSTGRES_PASSWORD}@postgres:5432/tiled_catalog | ||
| - TILED_CATALOG_WRITABLE_STORAGE=["file:///storage", "postgresql://tiled:${POSTGRES_PASSWORD}@postgres:5432/tiled_storage"] | ||
| - TILED_STREAMING_CACHE_URI=redis://:${REDIS_PASSWORD}@redis:6379 | ||
| volumes: | ||
| - tiled_data:/storage | ||
| ports: | ||
| - 8000:8000 | ||
| restart: unless-stopped | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| redis: | ||
| condition: service_healthy | ||
| networks: | ||
| - backend | ||
| healthcheck: | ||
| test: curl --fail http://localhost:8000/healthz || exit 1 | ||
| interval: 60s | ||
| timeout: 10s | ||
| retries: 3 | ||
| start_period: 30s | ||
|
|
||
| postgres: | ||
| image: docker.io/postgres:16 | ||
| environment: | ||
| - POSTGRES_USER=tiled | ||
| - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
| # We create two databases, 'tiled_catalog' (metadata) and | ||
| # 'tiled_storage' (tabular data) below. But it is required to | ||
| # specify one here, so we use 'postgres' as a neutral default. | ||
| - POSTGRES_DB=postgres | ||
| volumes: | ||
| - postgres_data:/var/lib/postgresql/data | ||
| - ./initdb:/docker-entrypoint-initdb.d | ||
| restart: unless-stopped | ||
| networks: | ||
| - backend | ||
| healthcheck: | ||
| test: pg_isready -U tiled -d postgres | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 10s | ||
|
|
||
| redis: | ||
| image: docker.io/redis:7-alpine | ||
| command: redis-server --requirepass ${REDIS_PASSWORD} | ||
| volumes: | ||
| - redis_data:/data | ||
| restart: unless-stopped | ||
| networks: | ||
| - backend | ||
| healthcheck: | ||
| test: redis-cli -a ${REDIS_PASSWORD} ping | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 5s | ||
|
|
||
| volumes: | ||
| tiled_data: | ||
| postgres_data: | ||
| redis_data: | ||
|
|
||
| networks: | ||
| backend: {} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't chowning the volume from within the container change the ownership of the files outsdie the container, those mounted on
/storage?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Same as would happen with PG or Redis.
It matters that this "storage" is all Tiled-controlled: the catalog, Zarr and Parquet data written by the server, etc. Any externally managed data would have to be separately managed, and explicitly/manually set with compatible permissions.