-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
106 lines (100 loc) · 2.67 KB
/
docker-compose.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
services:
ydb:
image: cr.yandex/yc/yandex-docker-local-ydb:24.1
platform: linux/amd64
hostname: ${YDB_NAME}
container_name: ${YDB_NAME}
#volumes:
# - ./ydbd/ydb_certs:/ydb_certs
# - ./ydbd/ydb_data:/ydb_data
environment:
- GRPC_TLS_PORT=2135
- GRPC_PORT=2136
- MON_PORT=8765
- YDB_ANONYMOUS_CREDENTIALS=true
- YDB_USE_IN_MEMORY_PDISKS=true
- YDB_FEATURE_FLAGS=enable_uuid_as_primary_key,enable_implicit_query_parameter_types
ports:
- "8765:8765"
#- "2135:2135"
#- "2136:2136"
networks:
- ydbcp-net
setup_ydb:
image: cr.yandex/yc/yandex-docker-local-ydb:24.1
platform: linux/amd64
container_name: ${YDB_NAME}-setup
volumes:
- ./init_db:/init_db
- ./internal/connectors/db/yql/schema:/init_db/schema
environment:
- YDB_ENDPOINT=grpc://${YDB_NAME}:2136
depends_on:
ydb:
condition: service_healthy
restart: "no"
command: bash -c "chmod +x ./init_db/create_tables.sh && ./init_db/create_tables.sh"
networks:
- ydbcp-net
s3:
image: quay.io/minio/minio
hostname: ${S3_NAME}
container_name: ${S3_NAME}
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}
MINIO_DOMAIN: ${S3_NAME}
ENABLE_VIRTUAL_STYLE: 1
ports:
#- "9000:9000"
- "9001:9001"
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 20s
retries: 3
networks:
ydbcp-net:
aliases:
- ${S3_BUCKET}.${S3_NAME}
setup_s3:
image: amazon/aws-cli
container_name: ${S3_NAME}-setup
environment:
- AWS_ACCESS_KEY_ID=${S3_ACCESS_KEY}
- AWS_SECRET_ACCESS_KEY=${S3_SECRET_KEY}
- AWS_DEFAULT_REGION=${S3_REGION}
- AWS_ENDPOINT_URL=http://${S3_NAME}:9000
depends_on:
s3:
condition: service_healthy
command: s3api create-bucket --bucket ${S3_BUCKET} --region ${S3_REGION}
networks:
- ydbcp-net
ydbcp:
image: ydbcp:local
hostname: local-ydbcp
container_name: local-ydbcp
environment:
S3_ENDPOINT: http://${S3_NAME}:9000
S3_REGION: ${S3_REGION}
S3_BUCKET: ${S3_BUCKET}
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
S3_SECRET_KEY: ${S3_SECRET_KEY}
YDB_NAME: ${YDB_NAME}
depends_on:
setup_ydb:
condition: service_completed_successfully
setup_s3:
condition: service_completed_successfully
build:
context: .
dockerfile: ./dockerfile
ports:
- "50051:50051"
networks:
- ydbcp-net
networks:
ydbcp-net:
name: ydbcp-net