Skip to content

Commit

Permalink
Revert .env to use localhost for database and instead change docker-c…
Browse files Browse the repository at this point in the history
…ompose #11
  • Loading branch information
joelvdavies committed Sep 23, 2024
1 parent 579e2f1 commit 10fd0d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ Listed below are the environment variables supported by the application.
| `OBJECT_STORAGE__ENDPOINT_URL` | The URL of the object storage S3 endpoint. | Yes | |
| `OBJECT_STORAGE__ACCESS_KEY` | The access key to use to authenticate with the S3 object storage. | Yes | |
| `OBJECT_STORAGE__SECRET_ACCESS_KEY` | The secret access key to use to authenticate with the S3 object storage. | Yes | |
| `OBJECT_STORAGE__BUCKET_NAME` | The name of the S3 bucket to use for object storage. | | |
| `OBJECT_STORAGE__BUCKET_NAME` | The name of the S3 bucket to use for object storage. | Yes | |
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ services:
build: .
volumes:
- ./object_storage_api:/object-storage-api-run/object_storage_api
restart: on-failure
ports:
- 8000:8000
restart: on-failure
depends_on:
- mongo-db
- minio
environment:
DATABASE__HOST_AND_OPTIONS: object_storage_api_mongodb_container:27017/?authMechanism=SCRAM-SHA-256&authSource=admin

mongo-db:
image: mongo:7.0-jammy
Expand Down
2 changes: 1 addition & 1 deletion object_storage_api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ API__ALLOWED_CORS_METHODS=["*"]
DATABASE__PROTOCOL=mongodb
DATABASE__USERNAME=root
DATABASE__PASSWORD=example
DATABASE__HOST_AND_OPTIONS="object_storage_api_mongodb_container:27017/?authMechanism=SCRAM-SHA-256&authSource=admin"
DATABASE__HOST_AND_OPTIONS="localhost:27017/?authMechanism=SCRAM-SHA-256&authSource=admin"
DATABASE__NAME=object-storage
OBJECT_STORAGE__ENDPOINT_URL="http://minio:9000"
OBJECT_STORAGE__ACCESS_KEY=root
Expand Down

0 comments on commit 10fd0d4

Please sign in to comment.