-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docker image to python 3.12 (#331)
Make image versatile to run as a client or as API
- Loading branch information
Showing
7 changed files
with
68 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,22 @@ | ||
#!/bin/sh | ||
|
||
DEFAULT_TERRACOTTA_SERVICE="tiler" | ||
API_SERVICE_KEYWORD="tiler" | ||
CLIENT_SERVICE_KEYWORD="client" | ||
|
||
|
||
# Validate that environment variables are set | ||
if [ -z "$TERRACOTTA_SERVICE" ]; then | ||
echo "TERRACOTTA_SERVICE is not set. Using default value: $DEFAULT_TERRACOTTA_SERVICE" | ||
TERRACOTTA_SERVICE=$DEFAULT_TERRACOTTA_SERVICE | ||
fi | ||
|
||
|
||
if [ $TERRACOTTA_SERVICE = $API_SERVICE_KEYWORD ]; then | ||
./entrypoint_api.sh | ||
elif [ $TERRACOTTA_SERVICE = $CLIENT_SERVICE_KEYWORD ]; then | ||
./entrypoint_client.sh | ||
else | ||
echo "TERRACOTTA_SERVICE is not set to a valid value. Exiting." | ||
exit 1 | ||
fi |
File renamed without changes.
This file contains 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,12 @@ | ||
#!/bin/sh | ||
|
||
|
||
# Validate that environment variables are set | ||
if [ -z "$TERRACOTTA_API_URL" ]; then | ||
echo "TERRACOTTA_API_URL is not set. Exiting." | ||
exit 1 | ||
fi | ||
|
||
|
||
# Start the server | ||
gunicorn terracotta.client.client_app:client_app --bind 0.0.0.0:$TC_SERVER_PORT |
This file contains 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,6 @@ | ||
import os | ||
from terracotta.client.flask_api import create_app | ||
|
||
TERRACOTTA_API_URL = os.environ["TERRACOTTA_API_URL"] | ||
|
||
client_app = create_app(TERRACOTTA_API_URL) |