-
Notifications
You must be signed in to change notification settings - Fork 0
/
devspace.yaml
executable file
·114 lines (107 loc) · 4.55 KB
/
devspace.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
version: v2beta1
name: tchoung-tegit
# This is a list of `pipelines` that DevSpace can execute (you can define your own)
pipelines:
# This is the pipeline for the main command: `devspace dev` (or `devspace run-pipeline dev`)
dev:
run: |-
run_dependencies --all # 1. Deploy any projects this project needs (see "dependencies")
ensure_pull_secrets --all # 2. Ensure pull secrets
create_deployments --all # 3. Deploy Helm charts and manifests specfied as "deployments"
start_dev app # 4. Start dev mode "app" (see "dev" section)
# You can run this pipeline via `devspace deploy` (or `devspace run-pipeline deploy`)
deploy:
run: |-
run_dependencies --all # 1. Deploy any projects this project needs (see "dependencies")
ensure_pull_secrets --all # 2. Ensure pull secrets
build_images --all -t $(git describe --always) # 3. Build, tag (git commit hash) and push all images (see "images")
create_deployments --all # 4. Deploy Helm charts and manifests specfied as "deployments"
# This is a list of `images` that DevSpace can build for this project
# We recommend to skip image building during development (devspace dev) as much as possible
images:
app:
image: mongulu/tchoung-te
dockerfile: ./Dockerfile
# This is a list of `deployments` that DevSpace can create for this project
deployments:
app:
# This deployment uses `helm` but you can also define `kubectl` deployments or kustomizations
helm:
# We are deploying this project with the Helm chart you provided
chart:
name: component-chart
repo: https://charts.devspace.sh
# Under `values` we can define the values for this Helm chart used during `helm install/upgrade`
# You may also use `valuesFiles` to load values from files, e.g. valuesFiles: ["values.yaml"]
values:
containers:
- image: mongulu/tchoung-te
env:
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
key: root
name: openai-credentials
- name: LANGCHAIN_TRACING_V2
value: "true"
- name: LANGCHAIN_ENDPOINT
value: https://api.smith.langchain.com
- name: LANGCHAIN_PROJECT
value: tchoung-te
- name: LANGCHAIN_API_KEY
valueFrom:
secretKeyRef:
key: root
name: langchain-credentials
service:
ports:
- port: 8000
type: LoadBalancer
ingress:
tls: true
tlsClusterIssuer: letsencrypt-prod
ingressClass: traefik
rules:
- host: ai.mongulu.cm
# This is a list of `dev` containers that are based on the containers created by your deployments
dev:
app:
# Search for the container that runs this image
imageSelector: mongulu/tchoung-te
# Replace the container image with this dev-optimized image (allows to skip image building during development)
devImage: python:3.11.7-bullseye
# Sync files between the local filesystem and the development container
sync:
- path: ./:/app
# Open a terminal and use the following command to start it
terminal:
command: ./app/devspace_start.sh
# Inject a lightweight SSH server into the container (so your IDE can connect to the remote dev env)
ssh:
enabled: true
# Make the following commands from my local machine available inside the dev container
proxyCommands:
- command: devspace
- command: kubectl
- command: helm
- gitCredentials: true
# Forward the following ports to be able access your application via localhost
ports:
- port: "8000"
# Open the following URLs once they return an HTTP status code other than 502 or 503
open:
- url: http://localhost:8000
# Use the `commands` section to define repeatable dev workflows for this project
commands:
migrate-db:
command: |-
echo 'This is a cross-platform, shared command that can be used to codify any kind of dev task.'
echo 'Anyone using this project can invoke it via "devspace run migrate-db"'
# Define dependencies to other projects with a devspace.yaml
# dependencies:
# api:
# git: https://... # Git-based dependencies
# tag: v1.0.0
# ui:
# path: ./ui # Path-based dependencies (for monorepos)
# To fill , use https://www.devspace.sh/component-chart/docs/configuration