Create the Environment

Create a Project

Before an environment can be created, you will need a Project. Projects can include one or several environments and allow you to test your applications and their individual features.

For example, you can set up a project for every app you're currently developing, each project containing environments for staging, development, QA, production etc.

Set up your first Project by following the steps below:

1. Click the Create project button in the Bunnyshell interface.

2. For this particular example, let's name your Project Getting Started.

3. Click the Create project button once more and you're all set!

Additionally you can find out more by accessing the Projects page.

Create an environment

You have your first Project. Now let's go ahead and create an Environment in it.

circle-info
  • An Environment is a user-defined group that brings together applications and all of the services and databases those applications require, running within a namespace.

There are two types of Environments that can be created in Bunnyshell:

  • Primary environments. These are manually-created environments and are not destroyed automatically. Typically they are for more traditional staging or production workloads.

  • Ephemeral environments. Designed to be close replicas of production environments, ephemerals can be created on-demand or automatically only based on existing primary environments.

In this case, we'll create a primary environment:

1. Select your Project from the main Bunnyshell interface and click Create environment.

2. Let's name our Environment Bunnyshell-Books.

Congratulations! You now have your first project and your first environment. For more information on this topic, visit our Environments page linked below.

Adding the Application

Let's add an application by clicking on Create application in the environment view.

1. Select your Git account and the forked Bunnyshell Books repository.

2. Use master as branch, and leave the docker-compose file path to / (the default value), as it is located in the root of the repository.

3. Hit Continue. A few seconds will be needed to parse and validate docker-compose.yaml.

The following elements from the docker-compose.yaml file are detected :

  • the Services: frontend, backend, db

  • their exposed ports

  • how the services will be built (Dockerfiles, build arguments)

  • needed persistent volumes

  • default values for environment variables

circle-info

We use all this information to build Bunnyshell's Environment Definition, or env.yaml.

You can use this YAML definition moving forward, when modifying or adding services, or also use the UI.

circle-check

4. Finally, click Create Application and you're done. A few seconds will be needed to validate the configuration.

Sensible defaults for Bunnyshell

The reason for which this Application does not require any changes at all is that we've made minor preparations: we've included a separate .env file within the repository and named it .env.bunnyshell.

This way, you can keep the .env and .env.sample for development purposes and not interfere with your current process, while at the same time having some default values for Bunnyshell.

circle-info

Pro tip: Use .env.bunnyshell for setting Environment Variables for Bunnyshell.

Last updated

Was this helpful?