first commit

This commit is contained in:
jeremygan2021
2026-02-02 13:50:40 +08:00
commit b139efe138
104 changed files with 1030051 additions and 0 deletions

42
docker-compose.yml Normal file
View File

@@ -0,0 +1,42 @@
services:
db:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=market
- POSTGRES_USER=market
- POSTGRES_PASSWORD=123market
ports:
- "5432:5432"
backend:
build: ./backend
command: sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
volumes:
- ./backend:/app
ports:
- "8000:8000"
depends_on:
- db
environment:
- DB_NAME=market
- DB_USER=market
- DB_PASSWORD=123market
- DB_HOST=db
- DB_PORT=5432
frontend:
build: ./frontend
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "5173:5173"
environment:
- VITE_API_URL=http://localhost:8000/api
depends_on:
- backend
volumes:
postgres_data: