-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (52 loc) · 1.21 KB
/
docker-compose.yml
File metadata and controls
57 lines (52 loc) · 1.21 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
version: '3.8'
services:
mongodb:
image: mongo:7.0
container_name: textanalyzer-db
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
environment:
MONGO_INITDB_DATABASE: text_analyzer
healthcheck:
test: echo 'db.adminCommand("ping")' | mongosh
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: textanalyzer-api
ports:
- "8000:8000"
environment:
MONGODB_URL: mongodb://mongodb:27017/
DATABASE_NAME: text_analyzer
JWT_SECRET: dev-secret-key-change-in-prod
DEBUG: "True"
ALLOWED_ORIGINS: "http://localhost:3000,http://localhost:5173"
depends_on:
mongodb:
condition: service_healthy
volumes:
- ./backend:/app
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: textanalyzer-web
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
command: npm run dev
volumes:
mongodb_data:
driver: local
networks:
default:
name: textanalyzer-network