-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (72 loc) · 1.84 KB
/
docker-compose.yml
File metadata and controls
93 lines (72 loc) · 1.84 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
version: '3.8'
services:
# ==============================
# DATABASE (Local)
# ==============================
db:
image: postgres:16-alpine
container_name: flashcards-db-dev
restart: unless-stopped
# Читаем переменные из файла .env
env_file:
- .env
ports:
- "5432:5432" # Стандартный порт (было 5400)
volumes:
- pgdata-dev:/var/lib/postgresql/data
networks:
- flashcards-net
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
# ==============================
# API (Local)
# ==============================
api:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_CONFIGURATION: Debug
container_name: flashcards-api-dev
restart: unless-stopped
env_file:
- .env
ports:
- "5200:8080" # API будет доступно по localhost:5200
depends_on:
db:
condition: service_healthy
networks:
- flashcards-net
# ==============================
# FRONTEND (Local)
# ==============================
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: flashcards-frontend-dev
restart: unless-stopped
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
environment:
- VITE_API_URL=http://localhost:5200/api
- VITE_APP_TITLE=FlashcardsLoop (Docker Dev)
ports:
- "3005:3000" # Frontend на localhost:3005
depends_on:
- api
networks:
- flashcards-net
volumes:
pgdata-dev:
driver: local
networks:
flashcards-net:
driver: bridge
name: flashcards-network-dev