-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (91 loc) · 2.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
94 lines (91 loc) · 2.17 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
services:
# ==========================================
# Ambiente de Desenvolvimento
# Uso: docker-compose up app-dev
# Acesse: http://localhost:5173
# ==========================================
app-dev:
build:
context: .
dockerfile: Dockerfile.dev
container_name: eventos-cafe-dev
ports:
- '5173:5173'
volumes:
- .:/app
- /app/node_modules
env_file:
- .env
environment:
- CHOKIDAR_USEPOLLING=true
stdin_open: true
tty: true
networks:
- eventos-network
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
reservations:
cpus: '0.25'
memory: 256M
# ==========================================
# Ambiente de Staging (Validação pré-produção)
# Uso: docker-compose --profile staging up app-staging
# Acesse: http://localhost:3000
# ==========================================
app-staging:
build:
context: .
dockerfile: Dockerfile
args:
VITE_SUPABASE_URL: ${VITE_SUPABASE_URL}
VITE_SUPABASE_ANON_KEY: ${VITE_SUPABASE_ANON_KEY}
container_name: eventos-cafe-staging
ports:
- '3000:80'
networks:
- eventos-network
profiles:
- staging
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.1'
memory: 64M
# ==========================================
# Ambiente de Produção
# Uso: docker-compose --profile production up app-prod
# Acesse: http://localhost
# ==========================================
app-prod:
build:
context: .
dockerfile: Dockerfile
args:
VITE_SUPABASE_URL: ${VITE_SUPABASE_URL}
VITE_SUPABASE_ANON_KEY: ${VITE_SUPABASE_ANON_KEY}
container_name: eventos-cafe-prod
ports:
- '80:80'
networks:
- eventos-network
profiles:
- production
restart: unless-stopped
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
networks:
eventos-network:
driver: bridge