Skip to content

Commit

Permalink
Merge pull request #6 from Azure-Samples/cruft/update
Browse files Browse the repository at this point in the history
chore: accept new Cruft update
  • Loading branch information
kjaymiller authored Nov 3, 2023
2 parents 6546af6 + c2b67ac commit 2154cfa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/kjaymiller/cookiecutter-relecloud/",
"commit": "972993b589b44e87780a333d6081776eea23af2c",
"commit": "a3794bddf382c4c6fa4add5bf935ca14bca40a71",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ This project deploys a web application for a space travel agency using FastAPI.

This project has [Dev Container support](https://code.visualstudio.com/docs/devcontainers/containers), so it will be setup automatically if you open it in Github Codespaces or in local VS Code with the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).

If you're not using one of those options for opening the project, then you'll need to:
If you're *not* using one of those options for opening the project, then you'll need to:

1. Start up a local PostgreSQL server, create a database for the app, and set the following environment variables according to your database configuration.

```shell
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432
export POSTGRES_DATABASE=<YOUR DATABASE>
export POSTGRES_USERNAME=<YOUR USERNAME>
export POSTGRES_PASSWORD=<YOUR PASSWORD>
```

1. Create a [Python virtual environment](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments) and activate it.

Expand All @@ -32,10 +42,10 @@ If you're not using one of those options for opening the project, then you'll ne

## Running locally

Run gunicorn on the app:
If you're running the app inside VS Code or GitHub Codespaces, you can use the "Run and Debug" button to start the app.
```sh
python3 -m gunicorn fastapi_app:app --reload
python3 -m uvicorn fastapi_app:app --reload --port=8000
```
Expand Down
5 changes: 4 additions & 1 deletion src/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
{% if prod %}
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
{% endif %}


<!--main CSS theme file -->
<link rel="stylesheet" href="{{ url_for('static', path='res/css/theme.css') }}" />

<!-- For new browsers - multisize ico -->
<link rel="icon" type="image/x-icon" sizes="16x16 32x32" href="{{ url_for('static', path='res/img/favicon.ico') }}">

Expand Down

0 comments on commit 2154cfa

Please sign in to comment.