Skip to content

Commit

Permalink
chore(examples): update rust example to use action configs (#3756)
Browse files Browse the repository at this point in the history
  • Loading branch information
Walther authored Feb 14, 2023
1 parent 4ecf1b8 commit ad99cb7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 26 deletions.
4 changes: 2 additions & 2 deletions examples/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Example of using the Rust programming language with Garden.

Local development with hot reload:
Local development with live code synchronization:

```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}
---
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}

0 comments on commit ad99cb7

Please sign in to comment.