https://github.com/jackdbd/hello-cloud-run-clj
https://github.com/jackdbd/hello-cloud-run-clj
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jackdbd/hello-cloud-run-clj
- Owner: jackdbd
- Created: 2022-09-23T16:13:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T16:13:34.000Z (over 3 years ago)
- Last Synced: 2025-03-11T06:49:19.945Z (over 1 year ago)
- Language: Clojure
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hello-cloud-run-clj
This project uses [neil](https://github.com/babashka/neil).
## Tests
Run all tests:
```sh
clojure -M:test
```
## Development
```sh
clojure -M -m hello-cloud-run-clj.hello-cloud-run-clj
```
## Build
Compile the uberjar:
```sh
clojure -T:build uber
```
Run the uberjar:
```sh
java -jar ./target/hello-cloud-run-clj-1.2.0-standalone.jar 1 2 3
```
## Container
Build the container image:
```sh
docker build ./ --file Dockerfile \
--build-arg APP_NAME=hello-cloud-run-clj \
--tag hello-cloud-run-clj:latest
```
Inspect the container image with [dive](https://github.com/wagoodman/dive):
```sh
dive hello-cloud-run-clj:latest
```
Run the container:
```sh
docker run -it --rm -p 4000:3000 \
--env ENVIRONMENT=DEVELOPMENT \
--env PORT=3000 \
hello-cloud-run-clj:latest
```
## Deploy to Cloud Run
```sh
gcloud builds submit ./ --config cloudbuild.yaml --async
```
## Call the Cloud Run service
```sh
curl -L ${CLOUD_RUN_SERVICE_URL}
```