Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ USERNAME ?= admin123
DB_NAME ?= testdb
USERPWD ?= mysecretpassword
STACK_NAME ?= DMsSampleSetupStack
DB_ENDPOINT ?= postgres_server
DB_PORT ?= 5432
ENDPOINT_URL = http://localhost.localstack.cloud:4566
export AWS_ACCESS_KEY_ID ?= test
Expand All @@ -16,7 +15,7 @@ export AWS_DEFAULT_REGION ?= us-east-1
VENV_RUN = . $(VENV_ACTIVATE)

CLOUD_ENV = USERNAME=$(USERNAME) DB_NAME=$(DB_NAME) USERPWD=$(USERPWD) STACK_NAME=$(STACK_NAME)
LOCAL_ENV = USERNAME=$(USERNAME) DB_NAME=$(DB_NAME) USERPWD=$(USERPWD) STACK_NAME=$(STACK_NAME) DB_ENDPOINT=$(DB_ENDPOINT) DB_PORT=$(DB_PORT) ENDPOINT_URL=$(ENDPOINT_URL)
LOCAL_ENV = USERNAME=$(USERNAME) DB_NAME=$(DB_NAME) USERPWD=$(USERPWD) STACK_NAME=$(STACK_NAME) DB_PORT=$(DB_PORT) ENDPOINT_URL=$(ENDPOINT_URL)

ifeq ($(OS), Windows_NT)
VENV_ACTIVATE = $(VENV_DIR)/Scripts/activate
Expand Down
11 changes: 0 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,3 @@ services:
timeout: 2s
retries: 5
start_period: 10s
postgres_server:
container_name: dms-sample-postgres
image: postgres
ports:
- "127.0.0.1:5432:5432"
restart: always
command: -c 'wal_level=logical' -c 'max_replication_slots=10' -c 'max_wal_senders=10'
environment:
- POSTGRES_DB=${DB_NAME:-testdb}
- POSTGRES_USER=${USERNAME:-admin123}
- POSTGRES_PASSWORD=${USERPWD:-mysecretpassword}
2 changes: 0 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ def get_cfn_output():
def get_credentials(secret_arn: str) -> Credentials:
secret_value = secretsmanager.get_secret_value(SecretId=secret_arn)
credentials = Credentials(**json.loads(secret_value["SecretString"]))
if credentials["host"] == "postgres_server":
credentials["host"] = "localhost"
return credentials


Expand Down