-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (58 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
64 lines (58 loc) · 1.5 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: delivery-db1
restart: always
environment:
POSTGRES_DB: DeliveryAppDb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password123
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- delivery-network
backend:
build:
context: ./backend/DeliveryApp.Api
dockerfile: Dockerfile
container_name: delivery-api1
restart: on-failure
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:80
ConnectionStrings__DefaultConnection: "Host=postgres;Database=DeliveryAppDb;Username=postgres;Password=password123"
depends_on:
- postgres
ports:
- "5000:80"
networks:
- delivery-network
frontend:
build:
context: ./frontend/client_app
dockerfile: Dockerfile
container_name: delivery-frontend
environment:
- REACT_APP_API_URL=http://localhost:5000/ # Используем имя сервиса backend
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
ports:
- "3000:3000"
volumes:
- ./frontend/client_app:/app
- /app/node_modules
depends_on:
- backend
networks:
- delivery-network
stdin_open: true
tty: true
command: npm start
networks:
delivery-network:
driver: bridge
volumes:
postgres_data: