https://github.com/danasilver/trip-reports
https://github.com/danasilver/trip-reports
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/danasilver/trip-reports
- Owner: danasilver
- Created: 2024-07-28T22:26:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-30T06:33:13.000Z (almost 2 years ago)
- Last Synced: 2025-02-24T02:30:29.159Z (over 1 year ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Trip Reports
## Local Development
1. Install [Docker](https://docs.docker.com/get-docker/).
2. The app uses Google Cloud Storage for dev and prod static files. Install the
[gcloud CLI](https://cloud.google.com/sdk/docs/install) and login using an
account that has permission to read/write to the development bucket
(found in [.env](./.env)).
```
gcloud auth application-default login
```
See the docs on
[`django-storages[google]`](https://django-storages.readthedocs.io/en/latest/backends/gcloud.html).
3. Run:
```
docker compose up
```
### Developing inside a container
## Notes
### Developing inside a container
Launch or attach to a running container to develop within it and take advantage of the full environment (ex. installed dependencies).
See https://code.visualstudio.com/docs/devcontainers/containers.
tl;dr: `Cmd + Shift + P` -> Attach to running container
### Resources
#### Maps
* [Polyline algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
#### Google Cloud
* [Setting up Cloud Run for a Python service](https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service)
* [Django & Cloud Run tutorial](https://cloud.google.com/python/django/run)
* Includes Secret Manager, CloudSQL
* `GS_DEFAULT_ACL = 'publicRead'` is not compatible with [Uniform Bucket Level Access](https://cloud.google.com/storage/docs/uniform-bucket-level-access). Fails with "Cannot insert legacy ACL for an object when uniform bucket-level access is enabled."
* Cloud Build service account is no longer used as the default. See https://cloud.google.com/build/docs/cloud-build-service-account-updates.