# db-plug-n-play-poc

### Building Locally

```sh
docker build --build-arg VERSION=8.0.36 -t dbpoc --platform linux/amd64 .
```

### Running

* files in `./schema` are automatically run in alphabetical order

#### Directly

```sh
docker run --platform linux/amd64 -p 3306:3306 dbpoc:latest
```

#### Compose with additional data
```sh
docker compose up local
```
* `002_insert.sql` is applied on top of base image
* variables are overridden at runtime and will apply to `healthcheck.sh` and `schema/999_user.sql`


#### From Pre-Build ECR Image

* Configure access to `dev-generic` AWS role

```sh
docker compose up ecr
```
