Cycle automatically populates environment variables defined on the container image, but allows you to change the values or add completely new variables. These can be accessed within the container in your code.
Some environment variables are always created by Cycle, regardless of the image. Below is a full list of those values.
|CYCLE_INSTANCE_ID||The ID of the instance.|
|CYCLE_SERVER_ID||The ID of the server this container is deployed to.|
|CYCLE_CONTAINER_ID||The ID of the container.|
|CYCLE_CONTAINER_IDENTIFIER||An identifier used for this container.|
|CYCLE_ENVIRONMENT_ID||The ID of the environment this container is deployed in.|
|CYCLE_LOCATION_ID||The location of the server that this container is deployed to.|
|CYCLE_PROVIDER_IDENTIFIER||An identifier that indicates the provider of the server.|
|CYCLE_PROVIDER_LOCATION||The physical location of the server displayed as an abbreviation.|
|CYCLE_COMPUTE_PROXY||The Cycle compute proxy url.|
|CYCLE_FIRST_START||If this is the first time an instance starts this value will be yes, after that it will be no.|
|CYCLE_INSTANCE_IPV6_IP||The IPv6 address of this specific instance.|
|CYCLE_INSTANCE_IPV6_SUBNET||The subnet of the instance itself. If there are 5 instances this will be 1-5 depending on the instance.|
|CYCLE_INSTANCE_IPV6_CIDR||The IPv6 address range this instance can be assigned to.|
Environment variables defined on the image cannot be removed. Cycle interprets these as critical to the way your program works. However, their values can be changed, which may be useful for things such as specific development-only settings. You are free to create and remove environment variables outside of those defined on the image.
If you've got questions about the platform or need some help getting started, our team is more than happy to assist. Whether you're new to containers or just new to Cycle, reach out to us via livechat by clicking the blue circle in the bottom right corner. Join our Slack channel, and get help from the dev team or other members of the community, and check out our Roadmap to see what's planned for the future!