-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (41 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
44 lines (41 loc) · 1.11 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
services:
backend:
build:
context: .
dockerfile: docker/backend/Dockerfile
working_dir: /app
env_file:
- .env
environment:
PYTHONDONTWRITEBYTECODE: "1"
PYTHONUNBUFFERED: "1"
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
DATABASE_URL: ${DATABASE_URL:-sqlite:////app/db.sqlite3}
volumes:
- ./backend:/app
ports:
- "${BACKEND_PORT:-8000}:8000"
depends_on:
- redis
command: >-
sh -c "python manage.py migrate --noinput && gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers ${GUNICORN_WORKERS:-4} --worker-class gevent"
frontend:
image: node:18-alpine
working_dir: /app
environment:
VITE_NODE_ENV: development
volumes:
- ./frontend:/app
- frontend-node-modules:/app/node_modules
ports:
- "${FRONTEND_PORT:-3000}:3000"
depends_on:
- backend
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
redis:
image: redis:7.2-alpine
ports:
- "${REDIS_PORT:-6379}:6379"
command: redis-server --save "" --appendonly no
volumes:
frontend-node-modules: