Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(examples): update rust example to use action configs #3756

Merged
merged 2 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Example of using the Rust programming language with Garden.
Local development with hot reload:
Walther marked this conversation as resolved.
Show resolved Hide resolved

```bash
garden dev
garden deploy --dev
```

Local deployment with a release mode build:
Expand Down
55 changes: 31 additions & 24 deletions examples/rust/backend/backend.garden.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
kind: Module
kind: Build
name: backend
description: Rust backend server example.
description: Rust backend server example.
type: container
dockerfile: "${environment.name == 'release' ? 'release.Dockerfile' : 'dev.Dockerfile'}"
image: rust-example-${environment.name}
spec:
dockerfile: "${environment.name == 'release' ? 'release.Dockerfile' : 'dev.Dockerfile'}"

services:
- name: backend
devMode:
sync:
- source: ./
target: /app
mode: "one-way-replica"
exclude:
- target
ports:
- name: http
containerPort: 3000
healthCheck:
httpGet:
path: /
port: http
ingresses:
- path: /
port: http
hostname: backend.${var.base-hostname}
---
Walther marked this conversation as resolved.
Show resolved Hide resolved
kind: Deploy
name: backend
description: Backend service
type: container

build: backend

spec:
devMode:
sync:
- source: ./
target: /app
mode: "one-way-replica"
exclude:
- target
ports:
- name: http
containerPort: 3000
healthCheck:
httpGet:
path: /
port: http
ingresses:
- path: /
port: http
hostname: backend.${var.base-hostname}