-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (37 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
39 lines (37 loc) · 1.09 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
# Finward - Docker Compose
# Requiere: backend/.env (variables del backend)
# Requiere: .env en raíz con VITE_SUPABASE_URL y VITE_SUPABASE_ANON_KEY (ver .env.docker.example)
services:
backend:
build: ./backend
restart: unless-stopped
env_file:
- ./backend/.env
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:4000/health"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: ./frontend
args:
# Aquí el frontend tiene que hacer fetch local, así que apuntaremos VITE_API_URL
# sin dominio ya que NGINX lo enrutará internamente (ej. /api)
- VITE_API_URL=${VITE_API_URL:-/api}
- VITE_SUPABASE_URL=${VITE_SUPABASE_URL}
- VITE_SUPABASE_ANON_KEY=${VITE_SUPABASE_ANON_KEY}
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
proxy:
image: nginx:alpine
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- backend
- frontend