-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.yml
71 lines (67 loc) · 1.72 KB
/
docker-compose.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
services:
postgres:
image: postgres:14-alpine
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
healthcheck:
test: ["CMD", "psql", "-U", "${POSTGRES_USER}", "${POSTGRES_DB}"]
ports:
- '5432:5432'
localstack:
image: localstack/localstack:1.1
ports:
- ${LOCALSTACK_PORT}:${LOCALSTACK_PORT}
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "/tmp/localstack:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
s3_setup:
image: localstack/localstack:1.1
depends_on:
localstack:
condition: service_healthy
entrypoint: ["aws", "--endpoint-url", "http://localstack:4566", "s3api", "create-bucket", "--bucket", "${S3_BUCKET}"]
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
app:
build: .
depends_on:
postgres:
condition: service_healthy
environment:
- DATABASE_HOST=postgres
- DATABASE_DB=${POSTGRES_DB}
- DATABASE_USER=${POSTGRES_USER}
- DATABASE_PASSWORD=${POSTGRES_PASSWORD}
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- S3_ENDPOINT_URL=http://localstack:${LOCALSTACK_PORT}
- S3_BUCKET
- S3_PREFIX
ports:
- '9083:9083'
test:
build: test
depends_on:
app:
condition: service_healthy
profiles:
- dev
environment:
- HIVE_HOST=app
- HIVE_PORT=9083
- POSTGRES_HOST=postgres
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- S3_ENDPOINT_URL=http://localstack:${LOCALSTACK_PORT}
- S3_BUCKET
- S3_PREFIX
volumes:
- ./test:/app