Skip to main content
Version: 6.x (Latest)

Change Env Vars For Development

To add additional environment variables or change the value of existing environment variables for your dev container, you can specify the env field.

devspace.yaml
dev:
backend:
imageSelector: ghcr.io/org/project/image
devImage: ghcr.io/loft-sh/devspace-containers/python:3-alpine
env:
- name: DEBUG
value: "true"
- name: APP_PORT
value: "8080"

Config Reference

env required object[]

Env can be used to add environment variables to the container. DevSpace will not replace existing environment variables if an environment variable is defined here.

name required string

Name of the environment variable

value required string

Value of the environment variable