-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
51 lines (48 loc) · 1.52 KB
/
docker-compose.dev.yaml
File metadata and controls
51 lines (48 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: "3.8"
services:
localstack:
image: localstack/localstack
container_name: localstack-main
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DEBUG=${DEBUG:-1}
- DOCKER_HOST=unix:///var/run/docker.sock
- SERVICES=s3
- AWS_DEFAULT_REGION=${AWS_REGION}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_KEY}
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
create-bucket:
image: alpine:latest
container_name: create-bucket
environment:
- DEBUG=${DEBUG:-1}
- AWS_DEFAULT_REGION=${AWS_REGION}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_KEY}
depends_on:
- localstack
command:
- sh
- -c
- |
apk --no-cache add aws-cli
aws --endpoint=http://localstack:4566 s3 mb s3://${AWS_BUCKET}
aws --endpoint=http://localstack:4566 s3api put-bucket-acl --bucket ${AWS_BUCKET} --acl private
postgres:
image: postgres:latest
container_name: postgresql-container
environment:
POSTGRES_DB: ${PGDATABASE}
POSTGRES_USER: ${PGUSER}
POSTGRES_PASSWORD: ${PGPASSWORD}
ports:
- "${PGPORT}:${PGPORT}"
tmpfs:
- /var/lib/postgresql/data
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql