Phase 0: Docker, Git and Basic Deployment

Before you start programming, it’s a good idea to make sure you can upload a simple web application to our testing environment. In this phase, we’ll show you how. If you don’t understand some steps, don’t worry! The actual app development will be much more straightforward and won’t require a deep understanding of the following steps.

Git

Git is a version control system used by developers around the world. It allows multiple people on different devices to collaborate on the same project without having to send source code by carrier pigeons[?]. If you’ve never used Git before, we recommend checking out the official Quickstart guide from GitHub — the platform you’ll be using during the competition.

First, create a GitHub repository named in the format TdA26-TeamName. If your team name contains characters not allowed in repository names, that’s fine — the important thing is that it’s recognizable as your team’s repository. We recommend setting the repository to private and inviting only your team members.

When creating the repository, you can use one of our prepared templates. There are several templates for commonly used technologies and languages. If you’re using a technology that doesn’t have a template, choose the generic one — it only contains a GitHub Action (which allows you to upload the app to the testing environment).

Now add our account Tour-de-App-user to your repository.

While waiting for the invitation to be accepted, set up your submission key.

  • Log in to our submission system Tour de Cloud and generate a token.
  • In your repository settings (Settings), go to Secrets and variables Actions, and create a new repository secret called TDC_TOKEN. Set its value to your generated token.

Simple Application

Because this phase only tests whether you can deploy and run an app, you’ll only need two things:

  • The index page at / must be an HTML page that contains the text “Hello TdA” anywhere on it.

  • You must also have your first API[?] available at https://<identifier>.tourde.app/api, which returns the following JSON[?] object for a GET request:

{ "organization": "Student Cyber Games" }

TIP: If your app displays “Hello TdA” using a canvas element, it won’t pass our automated test.

Docker

Since there are many differently configured environments, it would be practically impossible to ensure that the app works the same on everyone’s computer and the server. That’s why we use Docker — a technology that allows apps to run in identical virtual environments using containerization[?].

If you’ve never used Docker before, we’ve prepared a guide to walk you through the basic setup.

If you used one of our non-generic templates, you don’t need to change anything. If you chose the generic one, implementing the containerization (writing a Dockerfile and Docker Compose) will be up to you.

Submission and Running Tests

Now that everything’s configured and your app includes all the required parts, it’s time to upload it and run the tests. The GitHub Action we prepared for you runs automatically with every commit to the main branch of your repository.

For more control over which version of the app is uploaded, you can:

  • Use our submission system to keep the last 5 uploaded versions of your app and select which one to deploy.
  • Disable the GitHub Action and enable it only when you’re ready to upload a new version.
  • Modify the GitHub Action configuration file to your preference.
  • Work on a development branch and merge into main only when necessary.

Once you see that the GitHub Action completed successfully, go to Tour de Cloud and click the “Run Tests” button under Phase 0. If the tests pass, congratulations — you can move on to the next stage of development!