feat: update API base URL and change exposed ports to 6969 for frontend and backend services
This commit is contained in:
@@ -30,4 +30,4 @@ OPENAI_MODEL=gpt-4o
|
||||
APP_RECIPIENTS=friend1@example.com,friend2@example.com
|
||||
|
||||
# ── Frontend (Vite build-time) ────────────────────────────────────────────────
|
||||
VITE_API_BASE_URL=http://localhost:80
|
||||
VITE_API_BASE_URL=http://localhost:6969
|
||||
|
||||
@@ -53,6 +53,6 @@ COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 6969
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:h2:mem:condado;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||
username: sa
|
||||
password:
|
||||
driver-class-name: org.h2.Driver
|
||||
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: create-drop
|
||||
ddl-auto: update
|
||||
show-sql: true
|
||||
properties:
|
||||
hibernate:
|
||||
dialect: org.hibernate.dialect.H2Dialect
|
||||
|
||||
mail:
|
||||
host: localhost
|
||||
host: mailhog
|
||||
port: 1025
|
||||
username: test
|
||||
password: test
|
||||
@@ -24,19 +15,3 @@ spring:
|
||||
auth: false
|
||||
starttls:
|
||||
enable: false
|
||||
|
||||
app:
|
||||
password: devpassword
|
||||
recipients: dev@example.com
|
||||
jwt:
|
||||
secret: dev-secret-key-at-least-256-bits-long-for-hs256-algorithm
|
||||
expiration-ms: 86400000
|
||||
|
||||
imap:
|
||||
host: localhost
|
||||
port: 993
|
||||
inbox-folder: INBOX
|
||||
|
||||
openai:
|
||||
api-key: dev-key
|
||||
model: gpt-4o
|
||||
|
||||
@@ -57,7 +57,7 @@ services:
|
||||
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
- "6969:80"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
|
||||
@@ -57,7 +57,7 @@ services:
|
||||
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "6969:80"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
|
||||
43
frontend/nginx.docker.conf
Normal file
43
frontend/nginx.docker.conf
Normal file
@@ -0,0 +1,43 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript
|
||||
text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# SPA fallback — unknown paths serve index.html so React Router works
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Proxy all /api/* requests to the Spring Boot backend
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 120s;
|
||||
}
|
||||
|
||||
# Convenience: proxy Swagger UI and OpenAPI spec
|
||||
location /swagger-ui/ {
|
||||
proxy_pass http://backend:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location /v3/api-docs {
|
||||
proxy_pass http://backend:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ http {
|
||||
text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 6969;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
Reference in New Issue
Block a user