Skip to content

Commit

Permalink
Merge pull request #1026 from dsalaza4/main
Browse files Browse the repository at this point in the history
feat(doc): #940 split makes reference
  • Loading branch information
dsalaza4 authored Mar 9, 2023
2 parents 1bf2764 + ea401f8 commit a678dfe
Show file tree
Hide file tree
Showing 19 changed files with 2,225 additions and 2,245 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
name: /docs/gh-deploy
with:
set-safe-directory: /github/workspace
args: sh -c "nix-env -if . && m . /docs gh-deploy"
args: sh -c "nix-env -if . && m . /docs gh-deploy --force --no-history"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand Down
18 changes: 17 additions & 1 deletion docs/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,23 @@ nav:
- index.md
- configuring-ci-cd.md
- versioning.md
- makes-nix-reference.md
- API:
- makes.nix:
- api/makes.nix/index.md
- api/makes.nix/database.md
- api/makes.nix/deploy.md
- api/makes.nix/development.md
- api/makes.nix/environment.md
- api/makes.nix/examples.md
- api/makes.nix/format.md
- api/makes.nix/framework-configuration.md
- api/makes.nix/lint.md
- api/makes.nix/monitoring.md
- api/makes.nix/performance.md
- api/makes.nix/secrets.md
- api/makes.nix/security.md
- api/makes.nix/test.md
- api/makes.nix/utilities.md
- architecture.md
- contributing.md
- governance.md
Expand Down
57 changes: 57 additions & 0 deletions docs/src/api/makes.nix/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## dynamoDb

Create a local dynamo database

Types:

- dynamoDb (`attrsOf targetType`): Optional.
Mapping of names to multiple databases.
Defaults to `{ }`.
- targetType (`submodule`):
- name (`str`),
- host (`str`): Optional, defaults to `127.0.0.1`.
- port (`str`): Optional, defaults to `8022`.
- infra (`str`): Optional. Absolute path to the directory containing the
terraform infraestructure.
- daemonMode (`boolean`): Optional, defaults to `false`.
- data (`listOf str`): Optional, defaults to []. Absolute paths with json documents,
with the format defined for
[BatchWriteItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html#API_BatchWriteItem_RequestSyntax).
- dataDerivation (`listOf package`): Optional, defaults to `[]`.
Derivations where the output ($ out), are json documents,
with the format defined for
[BatchWriteItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html#API_BatchWriteItem_RequestSyntax).
This is useful if you want to perform transformations on your data.

Example `makes.nix`:

```nix
{ projectPath
, ...
}:
{
dynamoDb = {
usersdb = {
host = "localhost";
infra = projectPath "/test/database/infra";
data = [
projectPath "/test/database/data"
];
daemonMode = true;
};
};
}
```

Example invocation: `$ m . /dyanmoDb/usersdb`

You can also overwrite the parameters with environment variables.

Example: `$ DAEMON=false m . /dyanmoDb/usersdb`

The following variables are available:

- HOST
- PORT
- DAEMON
- POPULATE
Loading

0 comments on commit a678dfe

Please sign in to comment.