-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitpod.yml
More file actions
62 lines (56 loc) · 1.86 KB
/
Copy path.gitpod.yml
File metadata and controls
62 lines (56 loc) · 1.86 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
image:
file: .gitpod.Dockerfile
tasks:
- name: Setup env & start services
init: |
# Generar .env si no existe — completar con tus credenciales de Supabase
if [ ! -f .env ]; then
GITPOD_BACKEND_URL="$(gp url 4000)"
GITPOD_FRONTEND_URL="$(gp url 80)"
cat > .env <<EOF
# === Base de datos (Supabase) ===
DATABASE_URL=postgresql://postgres:<PASSWORD>@<HOST>:5432/postgres
DIRECT_URL=postgresql://postgres:<PASSWORD>@<HOST>:5432/postgres
# === JWT ===
JWT_SECRET=changeme_jwt_secret
JWT_EXPIRES=7d
BCRYPT_ROUNDS=10
# === URLs (auto-generadas por Gitpod) ===
FRONTEND_URL=${GITPOD_FRONTEND_URL}
VITE_API_URL=${GITPOD_BACKEND_URL}
# === Gestor SaaS ===
GESTOR_EMAIL=admin@pms.local
GESTOR_PASSWORD=Admin1234!
GESTOR_NAME=Gestor SaaS
GESTOR_SYSTEM_HOTEL_NAME=Hotel PMS
# === Integraciones opcionales ===
MICROFACTURA_URL=
MICROFACTURA_API_KEY=
FORMINFO_API_KEY=
TURNSTILE_SECRET_KEY=
EOF
echo "⚠️ .env generado — edita DATABASE_URL y DIRECT_URL con tus credenciales de Supabase antes de continuar"
fi
command: |
# Verificar que DATABASE_URL fue configurado
if grep -q "<PASSWORD>" .env; then
echo "❌ Configura DATABASE_URL y DIRECT_URL en el archivo .env con tus credenciales de Supabase"
exit 1
fi
docker compose up --build -d
echo ""
echo "========================================="
echo " PMS Hotel levantado en Gitpod"
echo " Frontend: $(gp url 80)"
echo " Backend: $(gp url 4000)"
echo "========================================="
docker compose logs -f
ports:
- port: 80
onOpen: open-browser
visibility: public
name: Frontend
- port: 4000
onOpen: notify
visibility: public
name: Backend API