-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use unique app+project configuration for sample apps
- Loading branch information
1 parent
1ea5695
commit 4660cd5
Showing
7 changed files
with
32 additions
and
46 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 |
---|---|---|
@@ -1,5 +1,21 @@ | ||
import infra | ||
import os | ||
from pathlib import Path | ||
|
||
import klotho | ||
import klotho.aws as aws | ||
|
||
app = klotho.Application( | ||
"api", | ||
project=os.getenv("PROJECT_NAME", "starter1"), | ||
) | ||
|
||
dir = Path(__file__).parent.absolute() | ||
|
||
container = aws.Container( | ||
"my-container", | ||
dockerfile=str(dir / "Dockerfile"), | ||
context=str(dir), | ||
) | ||
|
||
api = aws.Api("my-api") | ||
api.route_to("/", infra.container) | ||
api.route_to("/", container) |
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