-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (60 loc) · 1.97 KB
/
docker-compose.yml
File metadata and controls
62 lines (60 loc) · 1.97 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
58
59
60
61
62
services:
api.note.me:
deploy:
restart_policy:
delay: 5s
window: 120s
max_attempts: 3
condition: on-failure
resources:
limits:
cpus: "0.50" # Máximo de 50% de 1 CPU
memory: 256M # Máximo de 256MB de RAM (Hono é muito leve!)
reservations:
cpus: "0.05" # Reserva de 5% de CPU
memory: 64M # Reserva de 64MB de RAM
container_name: api.note.me
env_file: .env
build:
context: ./
dockerfile: .docker/backend.dockerfile
ports:
- 3000:${PORT:-3000}
volumes:
- /api/node_modules
networks:
- note_me_network
app.note.me:
deploy:
restart_policy:
delay: 3s
window: 120s
condition: unless-stopped
resources:
limits:
cpus: "0.50" # Máximo de 50% de 1 CPU
memory: 512M # Máximo de 512MB de RAM
reservations:
cpus: "0.10" # Reserva garantida de 10% de CPU
memory: 128M # Reserva garantida de 128MB de RAM
container_name: app.note.me
build:
context: .
dockerfile: .docker/frontend.dockerfile
args:
VITE_CLERK_PUBLISHABLE_KEY: ${VITE_CLERK_PUBLISHABLE_KEY}
VITE_API_PROXY: ${VITE_API_PROXY}
VITE_AUTOSAVE_DELAY: ${VITE_AUTOSAVE_DELAY}
VITE_RECENT_TIME_UPDATE_AT: ${VITE_RECENT_TIME_UPDATE_AT}
VITE_TRANSITION_DURATION: ${VITE_TRANSITION_DURATION}
ports:
- 5173:5173
volumes:
- /app/node_modules
depends_on:
- "api.note.me"
networks:
- note_me_network
networks:
note_me_network:
driver: bridge