diff --git a/Makefile b/Makefile index 5d44f15..9921130 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ export MONGO_PASSWORD = test‍ export DASHBOARD_MONGO_USERNAME = username export DASHBOARD_MONGO_PASSWORD = password -export DASHBOARD_MONGO_MONGODB_URL = mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@mongodb:27017 export PROXY_IMAGE = ghcr.io/tarhche/proxy:latest diff --git a/compose.mongodb.yaml b/compose.mongodb.yaml index 39e715f..4fe2465 100644 --- a/compose.mongodb.yaml +++ b/compose.mongodb.yaml @@ -1,6 +1,6 @@ services: mongodb: - image: mongo:8.0 + image: mongodb/mongodb-community-server:8.0-ubi9 networks: - mongodb deploy: @@ -13,7 +13,7 @@ services: max_attempts: 3 resources: limits: - cpus: '0.50' + cpus: '1' memory: 200M environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME} diff --git a/compose.mongodb_dashboard.yaml b/compose.mongodb_dashboard.yaml index d14439d..f11e8ad 100644 --- a/compose.mongodb_dashboard.yaml +++ b/compose.mongodb_dashboard.yaml @@ -1,6 +1,6 @@ services: mongodb_dashboard: - image: mongo-express + image: mongo-express:1-20-alpine3.19 networks: - mongodb - mongodb_dashboard @@ -17,9 +17,12 @@ services: cpus: '0.20' memory: 150M environment: + ME_CONFIG_MONGODB_SERVER: mongodb + ME_CONFIG_MONGODB_PORT: 27017 ME_CONFIG_BASICAUTH_USERNAME: ${DASHBOARD_MONGO_USERNAME} ME_CONFIG_BASICAUTH_PASSWORD: ${DASHBOARD_MONGO_PASSWORD} - ME_CONFIG_MONGODB_URL: ${DASHBOARD_MONGO_MONGODB_URL} + ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_USERNAME} + ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_PASSWORD} networks: mongodb_dashboard: diff --git a/resources.tf b/resources.tf index 796316b..ff74024 100644 --- a/resources.tf +++ b/resources.tf @@ -225,6 +225,8 @@ resource "aws_lb_target_group" "http" { } # can't be imported, that's why the below lines are commented +# - if it's the first time you wrap infrastructure, uncomment the below code +# - if it's not first time and the target group is there, you need to connect target group to your EC2 # resource "aws_lb_target_group_attachment" "backend_http" { # target_group_arn = aws_lb_target_group.http.arn # target_id = aws_instance.backend.id