50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
|
version: '3.8'
|
||
|
|
||
|
services:
|
||
|
app:
|
||
|
build:
|
||
|
context: .
|
||
|
dockerfile: Dockerfile
|
||
|
ports:
|
||
|
- "8080:8080"
|
||
|
environment:
|
||
|
- AWS_ACCESS_KEY_ID=test
|
||
|
- AWS_SECRET_ACCESS_KEY=test
|
||
|
- AWS_REGION=us-east-1
|
||
|
- S3_BUCKET_NAME=tutorial-videos
|
||
|
- AWS_ENDPOINT_URL=http://localstack:4566
|
||
|
- AUTH_MODE=dev
|
||
|
- AWS_S3_FORCE_PATH_STYLE=true
|
||
|
depends_on:
|
||
|
localstack:
|
||
|
condition: service_healthy
|
||
|
volumes:
|
||
|
- ./templates:/app/templates
|
||
|
networks:
|
||
|
- tutorial-network
|
||
|
localstack:
|
||
|
image: localstack/localstack:latest
|
||
|
ports:
|
||
|
- "4566:4566"
|
||
|
environment:
|
||
|
- SERVICES=s3
|
||
|
- DOCKER_HOST=unix:///var/run/docker.sock
|
||
|
- DEFAULT_REGION=us-east-1
|
||
|
- AWS_ACCESS_KEY_ID=test
|
||
|
- AWS_SECRET_ACCESS_KEY=test
|
||
|
- DATA_DIR=/tmp/localstack/data
|
||
|
- PERSISTENCE=1
|
||
|
volumes:
|
||
|
- ./localstack-init:/etc/localstack/init/ready.d
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
#- ./.localstack:/tmp/localstack
|
||
|
healthcheck:
|
||
|
test: ["CMD", "awslocal", "s3", "ls"]
|
||
|
interval: 5s
|
||
|
timeout: 5s
|
||
|
retries: 10
|
||
|
networks:
|
||
|
- tutorial-network
|
||
|
networks:
|
||
|
tutorial-network:
|
||
|
driver: bridge
|