To configure a dev environment for a project, you should use a devfile. Devfile is an open specification that uses YAML formatting for configuring and running build environments. Space supports only a feature subset of the 2.2.0 specification (the supported features are fully covered by the current Space documentation – if a feature is not mentioned in this documentation, it's not supported).
A project may have a single devfile.yaml file or a number of *.devfile.yaml files located in the .space directory in the repository root.
When users create a dev environment, they can choose from all devfiles available in the project. Dev environment settings are taken from the selected devfile.
Create a devfile
You should create a devfile manually in the .space directory of your project. If you create or edit the devfile in the Space UI, you can use the built-in devfile snippets.
A project owner can enable automatic generation of devfiles for the project. If a user doesn't specify a particular devfile when creating a new dev environment, Space will generate a devfile automatically based on the settings provided in the creation dialog. The generated devfile will be stored in .space/generated.devfile.yaml (if the file already exists, it'll be rewritten). After the dev environment is created, the user can commit and push this file to the project repository.
Click Settings and select Auto-generate a devfile on start if an existing file is not specified.
name: 'My custom dev env configuration'
# regular, large, xlarge
# a default IDE for the project
# (Required) IDE type: Idea, WebStorm, PyCharm,
# RubyMine, CLion, Fleet, GoLand, PhpStorm
# Space uses JetBrains Toolbox App to install IDEs to a dev environment.
# updateChannel defines IDE version release stage: Release, EAP
# JVM configuration (appends to the default .vmoptions file)
# a warm-up snapshot
# create a snapshot every Sunday (only for main branch)
- type: schedule
cron: '0 0 0 ? * SUN *'
# run additional warmup script (IDE indexes will be built anyway)
# Parameters and secretes required by a dev environment
# e.g., credentials to an external service
# (Required) the name of the environment variable
# that will be available in the dev environment
- name: USERNAME
description: 'Space username'
- name: PASSWORD
description: 'Space permanent token'
- name: dev-container
# Dev environment container config
# use image from a Space Packages registry
# environment variables
- name: API_URL
- name: PATH_IMG