Skip to content

Commit

Permalink
Update docker compose to fix the issue with localstack
Browse files Browse the repository at this point in the history
  • Loading branch information
mandanakhademi committed Mar 4, 2024
1 parent eecda74 commit 56c44d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/services/storage_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def create_configuration
def create_client
if Rails.env.test?
Aws::S3::Client.new(
endpoint: "http://localhost:4566",
endpoint: "http://127.0.0.1:4566",
credentials: Aws::Credentials.new(
@configuration.access_key_id,
@configuration.secret_access_key,
Expand Down
2 changes: 1 addition & 1 deletion bin/init-s3-localstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

s3_client = boto3.client(
"s3",
endpoint_url=f"http://localhost:4566",
endpoint_url=f"http://127.0.0.1:4566",
aws_access_key_id="test",
aws_secret_access_key="test"
)
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2022_10_17_135842) do
ActiveRecord::Schema[7.1].define(version: 2022_10_17_135842) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ services:
environment:
- PERSISTENCE=1
ports:
- "4566:4566"
- "127.0.0.1:4566:4566"
volumes:
- "./bin/init-s3-localstack.py:/etc/localstack/init/ready.d/init-s3.py"
- "/var/run/docker.sock:/var/run/docker.sock"

mock-api:
build: http-mock-server
Expand Down

0 comments on commit 56c44d0

Please sign in to comment.