Add deploy command to repos generated by cli template (#11711)

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
- **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below),
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` to check this
locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc:

https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in `docs/extras`
directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
pull/11716/head
Nuno Campos 9 months ago committed by GitHub
parent 1c0857b53e
commit 7f4734c0dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,6 +26,9 @@ format format_diff:
black $(PYTHON_FILES)
ruff --select I --fix $(PYTHON_FILES)
deploy_gcp:
gcloud run deploy ____project_name_identifier --source . --port 8001 --env-vars-file .env.gcp.yaml --allow-unauthenticated --region us-central1 --min-instances 1
######################
# HELP
######################
@ -36,3 +39,4 @@ help:
@echo 'make format - run code formatters'
@echo 'make lint - run linters'
@echo 'make test - run unit tests'
@echo 'make deploy_gcp - deploy to GCP'

@ -26,6 +26,9 @@ format format_diff:
poetry run black $(PYTHON_FILES)
poetry run ruff --select I --fix $(PYTHON_FILES)
deploy_gcp:
gcloud run deploy ____project_name_identifier --source . --port 8001 --env-vars-file .env.gcp.yaml --allow-unauthenticated --region us-central1 --min-instances 1
######################
# HELP
######################
@ -36,3 +39,4 @@ help:
@echo 'make format - run code formatters'
@echo 'make lint - run linters'
@echo 'make test - run unit tests'
@echo 'make deploy_gcp - deploy to GCP'

@ -116,6 +116,7 @@ venv/
ENV/
env.bak/
venv.bak/
.env.gcp.yaml
# Spyder project settings
.spyderproject

@ -57,6 +57,15 @@ docker run -p 8001:8001 -e PORT=8001 ____project_name_identifier:latest
Don't forget to add any needed environment variables!
## Deploy to GCP
You can deploy to GCP Cloud Run using the following command:
First edit `.env.gcp.yaml` file with any environment variables you need. Then run:
```
make deploy_gcp
```
## Contributing

Loading…
Cancel
Save