@@ -9,6 +9,11 @@ services:
99 DATABASE_URL : postgresql://postgres:asdfasdf@db:5432/postgres
1010 TEST_DATABASE_URL : postgresql://postgres:asdfasdf@test_db:5432/postgres
1111 JOB_FUNCTION_URL : http://job_worker:8080/2015-03-31/functions/function/invocations
12+ AWS_REGION : us-east-1
13+ AWS_ACCESS_KEY_ID : test
14+ AWS_SECRET_ACCESS_KEY : test
15+ AWS_ENDPOINT_URL_S3 : http://localstack:4566
16+ AWS_S3_FORCE_PATH_STYLE : " true"
1217 volumes :
1318 - ./:/app
1419 - server-node-modules:/app/node_modules
@@ -17,6 +22,8 @@ services:
1722 depends_on :
1823 db :
1924 condition : service_healthy
25+ localstack :
26+ condition : service_healthy
2027 job_worker :
2128 build :
2229 context : .
@@ -25,6 +32,12 @@ services:
2532 restart : always
2633 environment :
2734 DATABASE_URL : postgresql://postgres:asdfasdf@db:5432/postgres
35+ AWS_REGION : us-east-1
36+ AWS_ACCESS_KEY_ID : test
37+ AWS_SECRET_ACCESS_KEY : test
38+ AWS_ENDPOINT_URL_S3 : http://localstack:4566
39+ AWS_S3_FORCE_PATH_STYLE : " true"
40+ EXPORT_PUBLIC_S3_ENDPOINT : http://localhost:4566
2841 volumes :
2942 - ./:/app
3043 - job-worker-node-modules:/app/node_modules
@@ -33,9 +46,27 @@ services:
3346 depends_on :
3447 db :
3548 condition : service_healthy
49+ localstack :
50+ condition : service_healthy
3651 env_file :
3752 - path : .env
3853 required : false
54+ localstack :
55+ image : localstack/localstack:4
56+ environment :
57+ - SERVICES=s3
58+ - DEFAULT_REGION=us-east-1
59+ - LS_LOG=warn
60+ volumes :
61+ - ./localstack/data:/var/lib/localstack
62+ - ./localstack/init:/etc/localstack/init
63+ ports :
64+ - 4566:4566
65+ healthcheck :
66+ test : ["CMD", "bash", "-c", "awslocal s3 ls >/dev/null 2>&1"]
67+ interval : 10s
68+ timeout : 5s
69+ retries : 5
3970 db :
4071 build :
4172 dockerfile : db/Dockerfile
0 commit comments