# Vending Machine C# - Test Driven Development exercise

## Building the Docker image

To build the course image:

```bash
./build.sh 
```

To push it to AWS registry:

```bash
docker-login.sh
./build.sh push
```

## Set up for deployment

Add an SSH config for `course-server`:
```
Host course-server
Hostname ec2-3-65-110-13.eu-central-1.compute.amazonaws.com
IdentityFile ~/.ssh/<your key goes here>
User ubuntu
```

## Deployment 

Deployment uses Donstro: https://github.com/rwestgeest/donstro

The docker-compose file describing the course instances can be found in `donstro/`

Deploy the composition to `course-server` using Donstro, first let the server login to AWS ECR (using `docker-login` from the course-infra repo):

```bash
docker-login.sh course-server
```

Then deploy:

```bash
donstro_single up
```

## stopping containers
donstro_single stop

## getting in a container
donstro_single exec cat bash

## cleanup volumes
donstro_single down -v

## Setting login passwords for the containers

TBD
