Skip to content

Commit 4502ab7

Browse files
committed
ft- deploy de bdd postgreSQL en Render + config. Anda ok
1 parent 11e6d36 commit 4502ab7

File tree

51 files changed

+513
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+513
-5
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# === database postgresql in render connection ====
2+
3+
SPRING_DATASOURCE_RENDER_URL=jdbc:postgresql://[url desde render]?sslmode=require
4+
SPRING_DATASOURCE_RENDER_USERNAME=root
5+
SPRING_DATASOURCE_RENDER_PASSWORD=1

src/main/resources/application.properties

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# 🧥 OutfitLab Backend - Default Configuration
21
# ===========================================
32

43
spring.application.name=outfitlab-backend
54

6-
spring.datasource.url=${SPRING_DATASOURCE_LOCAL_URL}
7-
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
8-
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
9-
spring.datasource.driver-class-name=org.postgresql.Driver
5+
#spring.datasource.url=${SPRING_DATASOURCE_LOCAL_URL}
6+
#spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
7+
#spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
8+
#spring.datasource.driver-class-name=org.postgresql.Driver
109

1110
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
1211
spring.jpa.hibernate.ddl-auto=update
@@ -47,4 +46,16 @@ spring.servlet.multipart.max-request-size=50MB
4746
management.endpoints.web.exposure.include=health,info
4847
management.endpoint.health.show-details=always
4948

49+
#spring.datasource.url=jdbc:h2:mem:testdb
50+
#spring.datasource.driver-class-name=org.h2.Driver
51+
#spring.datasource.username=sa
52+
#spring.datasource.password=
53+
54+
# ====== CONFIG PARA DB en RENDER =====
55+
spring.datasource.url=${SPRING_DATASOURCE_RENDER_URL}
56+
spring.datasource.username=${SPRING_DATASOURCE_RENDER_USERNAME}
57+
spring.datasource.password=${SPRING_DATASOURCE_RENDER_PASSWORD}
58+
spring.datasource.driver-class-name=org.postgresql.Driver
59+
60+
5061

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# 🐳 OutfitLab Backend - Docker Configuration
2+
# ========================================
3+
4+
spring.application.name=outfitlab-backend
5+
6+
# ===== Database Configuration =====
7+
# Estas variables ahora se leen desde .env via docker-compose
8+
spring.datasource.url=${SPRING_DATASOURCE_URL}
9+
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
10+
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
11+
spring.datasource.driver-class-name=org.postgresql.Driver
12+
13+
# JPA/Hibernate Configuration
14+
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
15+
spring.jpa.hibernate.ddl-auto=update
16+
spring.jpa.show-sql=true
17+
spring.jpa.properties.hibernate.format_sql=true
18+
19+
# ===== Redis Configuration =====
20+
# Variables desde .env
21+
spring.redis.host=${REDIS_HOST:redis}
22+
spring.redis.port=${REDIS_PORT:6379}
23+
spring.redis.timeout=2000ms
24+
25+
# ===== MinIO Configuration =====
26+
# Variables desde .env
27+
minio.endpoint=${MINIO_ENDPOINT:http://minio:9000}
28+
minio.access-key=${MINIO_ACCESS_KEY}
29+
minio.secret-key=${MINIO_SECRET_KEY}
30+
minio.bucket.images=${MINIO_BUCKET_IMAGES:outfitlab-images}
31+
minio.bucket.models=${MINIO_BUCKET_MODELS:outfitlab-models}
32+
33+
# ===== Security Configuration =====
34+
# Variables desde .env
35+
spring.security.user.name=${SPRING_SECURITY_USER_NAME:admin}
36+
spring.security.user.password=${SPRING_SECURITY_USER_PASSWORD:admin123}
37+
38+
# ===== Server Configuration =====
39+
server.port=8080
40+
server.error.include-message=always
41+
server.error.include-binding-errors=always
42+
43+
# ===== Logging Configuration =====
44+
logging.level.root=INFO
45+
logging.level.org.springframework.web=DEBUG
46+
logging.level.com.outfitlab.project=DEBUG
47+
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
48+
49+
# ===== File Upload Configuration =====
50+
spring.servlet.multipart.max-file-size=50MB
51+
spring.servlet.multipart.max-request-size=50MB
52+
53+
# ===== Management/Actuator =====
54+
management.endpoints.web.exposure.include=health,info,metrics
55+
management.endpoint.health.show-details=always
56+
management.health.redis.enabled=true
57+
management.health.db.enabled=true
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# ===========================================
2+
3+
spring.application.name=outfitlab-backend
4+
5+
#spring.datasource.url=${SPRING_DATASOURCE_LOCAL_URL}
6+
#spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
7+
#spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
8+
#spring.datasource.driver-class-name=org.postgresql.Driver
9+
10+
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
11+
spring.jpa.hibernate.ddl-auto=update
12+
spring.jpa.show-sql=true
13+
spring.jpa.properties.hibernate.format_sql=true
14+
15+
tripo.api.key=tsk_IDtE_QEJ0ZCwQJDvy7HEotADi6auStMdj5dka5Z3LpV
16+
17+
# ===== Development Configuration =====
18+
# ===== MinIO Configuration (Local Development) =====
19+
minio.endpoint=http://localhost:9000
20+
minio.access-key=minioadmin
21+
minio.secret-key=minioadmin123
22+
minio.bucket.images=outfitlab-images
23+
minio.bucket.models=outfitlab-models
24+
25+
# ===== Security (basic for development) =====
26+
spring.security.user.name=admin
27+
spring.security.user.password=admin123
28+
spring.main.allow-bean-definition-overriding=true
29+
30+
# ===== Server Configuration =====
31+
server.port=8080
32+
33+
# ===== Logging Configuration =====
34+
logging.level.root=INFO
35+
logging.level.org.springframework.web=DEBUG
36+
logging.level.org.springframework.security=DEBUG
37+
logging.level.com.outfitlab.project=DEBUG
38+
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
39+
40+
# ===== File Upload Configuration =====
41+
spring.servlet.multipart.enabled=true
42+
spring.servlet.multipart.max-file-size=50MB
43+
spring.servlet.multipart.max-request-size=50MB
44+
45+
# ===== Management/Actuator =====
46+
management.endpoints.web.exposure.include=health,info
47+
management.endpoint.health.show-details=always
48+
49+
#spring.datasource.url=jdbc:h2:mem:testdb
50+
#spring.datasource.driver-class-name=org.h2.Driver
51+
#spring.datasource.username=sa
52+
#spring.datasource.password=
53+
54+
# ====== CONFIG PARA DB en RENDER =====
55+
spring.datasource.url=${SPRING_DATASOURCE_RENDER_URL}
56+
spring.datasource.username=${SPRING_DATASOURCE_RENDER_USERNAME}
57+
spring.datasource.password=${SPRING_DATASOURCE_RENDER_PASSWORD}
58+
spring.datasource.driver-class-name=org.postgresql.Driver
59+
60+
61+

target/classes/application.yml

Whitespace-only changes.
896 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
871 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)