forked from DeStep3000/nizniy_maps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
52 lines (50 loc) · 1.42 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
52 lines (50 loc) · 1.42 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
services:
postgres:
image: postgis/postgis:15-3.3
container_name: postgres_db
environment:
POSTGRES_DB: locations_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
TZ: Europe/Moscow
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d locations_db" ]
interval: 10s
timeout: 5s
retries: 10
app:
container_name: nizhny_maps_dev
build:
context: .
dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
working_dir: /app
volumes:
- .:/app
- uv_cache:/root/.cache/uv
ports:
- "8501:8501"
environment:
- PYTHONUNBUFFERED=1
- TZ=Europe/Moscow
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/locations_db
- YANDEXGPT_API_KEY=${YANDEXGPT_API_KEY}
- YANDEXGPT_FOLDER_ID=${YANDEXGPT_FOLDER_ID}
command: >
bash -lc "
uv sync --frozen &&
echo '⏳ Ждем 10 секунд пока PostgreSQL запустится...' &&
sleep 10 &&
echo '📊 Запуск выгрузки данных...' &&
uv run python -m src.simple_importer data_/cultural_objects_mnn.xlsx &&
uv run streamlit run main.py --server.port=8501 --server.address=0.0.0.0 --server.runOnSave true
"
volumes:
postgres_data:
uv_cache: