forked from naushadh/hive-metastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
66 lines (61 loc) · 1.56 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
version: '3.9'
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:
image: python:3.10-alpine
depends_on:
app:
condition: service_healthy
command: ["./test.sh"]
profiles:
- dev
working_dir: /scripts
volumes:
- ./scripts:/scripts
environment:
- HIVE_HOST=app
- HIVE_PORT=9083