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

Commit

Permalink
Add missing exposed port
Browse files Browse the repository at this point in the history
  • Loading branch information
lucj committed Oct 15, 2023
1 parent 1709e29 commit 07ce1e2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ containers: {
name: "MongoDB"
description: "Container running a MongoDB server"
image: "mongo:6.0"
ports: "27017/tcp"
env: {
MONGO_INITDB_ROOT_USERNAME: "root"
MONGO_INITDB_ROOT_PASSWORD: "secret://rootpassword/token"
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,22 @@ For instance, using this endpoint we can send an HTTP Get request using cURL:
```
$ curl k8s-test3e3d-apppubli-58f1d9adf4-5081003c9ca93235.elb.us-east-2.amazonaws.com:8000
{"message":"Webpage viewed 1 time(s)"}
```
```

## Parameters

When the single *MongoDB* instance is created, a default user is created, this one only has admin access against a given database. By default:
- *dbUser* is automatically generated
- *dbName* is set to "mydb"

These values can be changed using the *serviceArgs* property as follow:

```
services: db: {
image: "ghcr.io/lucj/acorn-postgres:v#.#.#"
serviceArgs: {
dbUser: "bar"
dbName: "foo"
}
}
```
1 change: 1 addition & 0 deletions scripts/render.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ while true; do
echo "[render.sh] wait for db to be ready"
mongosh --quiet --host "mongodb" --username ${MONGO_INITDB_ROOT_USERNAME} --password ${MONGO_INITDB_ROOT_PASSWORD} --authenticationDatabase admin --eval "db.runCommand({ ping: 1 })"
if [ $? -eq 0 ]; then
echo "[render.sh] db is ready"
break
fi
sleep 2
Expand Down

0 comments on commit 07ce1e2

Please sign in to comment.