-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (49 loc) · 1.23 KB
/
docker-compose.yml
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
services:
backend-dev:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: bionicscolar-backend-dev
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./backend:/app
ports:
- "8000:8000"
env_file:
- ./backend/.env
environment:
- ENVIRONMENT=development
backend-prod:
build:
context: ./backend
dockerfile: Dockerfile.prod
container_name: bionicscolar-backend-prod
command: daphne -b 0.0.0.0 -p 8000 api.asgi:application
ports:
- "8000:8000"
env_file:
- ./backend/.env
environment:
- ENVIRONMENT=production
frontend-dev:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: bionicscolar-frontend-dev
ports:
- "80:80" # Map Vite's dev server port
volumes:
- ./frontend:/app # Mount the current directory for live development
- /app/node_modules # Persist node_modules
environment:
- NODE_ENV=development
command: yarn dev --host
frontend-prod:
build:
context: ./frontend
dockerfile: Dockerfile.prod
container_name: bionicscolar-frontend-prod
ports:
- "80:80"
environment:
- NODE_ENV=production