Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from cloudnautique/main
Browse files Browse the repository at this point in the history
Updated metadata in Acornfile
  • Loading branch information
cloudnautique authored Jan 18, 2024
2 parents 457e489 + 3a80468 commit 27e975e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Acornfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
name: "External MongoDB Database"
description: "Creates an Acorn service to connect to an external MongoDB database."
readme: "./README.md"
info: localData.info

services: mongo: {
generated: job: "create"
default: true
Expand Down Expand Up @@ -59,4 +64,26 @@ localData: instructions: """
- adminPassword: the password to use to connect to the MongoDB server as an admin
- proto: the protocol to use to connect to the MongoDB server (mongodb or mongodb+srv)
- dbName: the name of the database to use

"""

localData: info: """
## Usage

services: db: {
image: "ghcr.io/acorn-io/mongodb-external:v#.#.#"
}

containers: app: {
image: "app-image"
env: {
DB_HOST: "@{@{service.}db.address}"
DB_PORT: "@{@{service.}db.port.27017}"
DB_NAME: "@{@{service.}db.data.dbName}"
DB_USER: "@{@{service.}db.secrets.user.username}"
DB_PASS: "@{@{service.}db.secrets.user.password}"
DB_ADMIN_USER: "@{@{service.}db.secrets.admin.username}"
DB_ADMIN_PASS: "@{@{service.}db.secrets.admin.password}"
}
}
"""

0 comments on commit 27e975e

Please sign in to comment.