-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
61 lines (55 loc) · 1.2 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
version: "3.9"
services:
redis:
image: redis:7
container_name: chatroom_redis
command: redis-server --save 60 1 --loglevel warning
ports:
- "6379:6379"
db:
image: postgres:13.8
container_name: chatroom_db
env_file:
- ./.env
volumes:
- ./pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5432:5432"
restart: always
app:
build: .
container_name: chatroom_back
command: sh -c "
python manage.py migrate &&
python3 -m uvicorn config.asgi:application --host 0.0.0.0 --port 8000 --workers 1 --log-level debug --reload
"
volumes:
- .:/app
- ./static:/app/static
- ./media:/app/media
ports:
- "8000:8000"
env_file:
- ./.env
depends_on:
- db
restart: always
environment:
- WATCHFILES_FORCE_POLLING=true
frontend:
build: ./frontend
container_name: chatroom_front
volumes:
- ./frontend:/app/frontend
ports:
- "5173:5173"
depends_on:
- app
command: npm run dev
volumes:
pgdata:
frontend: