TrangPham / django-admin-confirm

AdminConfirmMixin is a mixin for ModelAdmin that adds confirmations to changes, additions and actions.
Other
128 stars 16 forks source link

docker-compose.dev.yml localstack does not create "mybucket" #52

Open TrangPham opened 11 months ago

TrangPham commented 11 months ago

Describe the bug

Docker container for localstack supposed to create "mybucket":

docker-compose.yml

  localstack:
    image: localstack/localstack
    ports:
      - "4566:4566"
      - "4571:4571"
    environment:
      - SERVICES=s3
      - DEBUG=true
      # enable persistance
      - PERSISTENCE=1
      - LAMBDA_EXECUTOR=docker
      - DOCKER_HOST=unix:///var/run/docker.sock
      - HOSTNAME_EXTERNAL=localstack
    volumes:
      - "./docker-entrypoint-initaws.d:/docker-entrypoint-initaws.d"
      - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

mounts - "./docker-entrypoint-initaws.d:/docker-entrypoint-initaws.d"

./docker-entrypoint-initaws.d/create-bucket.sh

#!/bin/bash
set -x
awslocal s3 mb s3://mybucket
set +x

should execute and create s3 bucket named "mybucket"

Current workaround:

To Reproduce Steps to reproduce the behavior:

  1. Clone the repro
  2. Run:
    docker-compose -f docker-compose.dev.yml build
    docker-compose -f docker-compose.dev.yml up -d
  3. See that localhost:8000 not working, web container status is "started" but not running
  4. See error NoSuchBucket within terminal output of web container

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

Additional context Add any other context about the problem here.