Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
152 lines (145 loc) · 3.95 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
152 lines (145 loc) · 3.95 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
services:
ydb:
image: ${YDB_IMAGE}
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,enable_encrypted_export
ports:
- "8765:8765"
#- "2135:2135"
#- "2136:2136"
networks:
- ydbcp-net
init_ydb_schema:
image: ydbcp:local
container_name: ${YDB_NAME}-init-schema
build:
context: .
dockerfile: Dockerfile
environment:
YDB_NAME: ${YDB_NAME}
depends_on:
ydb:
condition: service_healthy
restart: "no"
command:
- ./bin/migrator
- --config=local_config.yaml
- --migrations-dir=migrations/yql
networks:
- ydbcp-net
ydb_schema_migration_test:
image: ydbcp:local
container_name: ${YDB_NAME}-schema-migration-test
build:
context: .
dockerfile: Dockerfile
environment:
YDB_CONNECTION_STRING: grpcs://${YDB_NAME}:2135/local
MIGRATIONS_DIR: migrations/yql
depends_on:
ydb:
condition: service_healthy
init_ydb_schema:
condition: service_completed_successfully
restart: "no"
command:
- ./migrate
networks:
- ydbcp-net
setup_ydb:
image: cr.yandex/yc/yandex-docker-local-ydb:24.1
platform: linux/amd64
container_name: ${YDB_NAME}-setup
volumes:
- ./cmd/integration/scripts:/scripts
environment:
- YDB_ENDPOINT=grpc://${YDB_NAME}:2136
depends_on:
ydb:
condition: service_healthy
init_ydb_schema:
condition: service_completed_successfully
ydb_schema_migration_test:
condition: service_completed_successfully
restart: "no"
command: bash -c "chmod +x ./scripts/create_test_tables.sh && ./scripts/create_test_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}
ENABLE_NEW_PATHS_FORMAT: ${ENABLE_NEW_PATHS_FORMAT}
ENABLE_BACKUPS_ENCRYPTION: ${ENABLE_BACKUPS_ENCRYPTION}
ENABLE_BACKUPS_COMPRESSION: ${ENABLE_BACKUPS_COMPRESSION}
ENABLE_CROSS_REGION_BACKUP_RESTORE: ${ENABLE_CROSS_REGION_BACKUP_RESTORE}
depends_on:
setup_ydb:
condition: service_completed_successfully
setup_s3:
condition: service_completed_successfully
build:
context: .
dockerfile: Dockerfile
ports:
- "50051:50051"
- "50052:50052"
networks:
- ydbcp-net
networks:
ydbcp-net:
name: ydbcp-net