Running SearchJobs in production requires more than justDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Esteban-Mendez-j/Proyecto-Docker/llms.txt
Use this file to discover all available pages before exploring further.
docker-compose up. You need to harden secrets, configure a real database password, replace the in-memory MongoDB assumption with a hosted service, build and serve the React frontend as a static bundle, and plan for file-upload persistence. This page covers each of these areas in turn.
Security hardening
The default configuration indocker-compose.yml and the sample .env prioritises convenience for local development. Before exposing the application to the internet, make the following changes.
JWT secret key
MY_SECRET_KEY in your production secrets store (e.g. a CI/CD secret, Docker Swarm secret, or a secrets manager). Never hard-code it in the repository.
MySQL password
Thedocker-compose.yml sets MYSQL_ALLOW_EMPTY_PASSWORD: "yes" and SPRING_DATASOURCE_PASSWORD: "" for local development. In production:
JPA DDL mode
Set this tovalidate (Hibernate checks the schema matches the entities but makes no changes) or none (Hibernate does nothing — manage schema with Flyway or Liquibase):
HTTPS and reverse proxy
The Spring Boot container exposes port8080 over plain HTTP. In production, place a reverse proxy in front of it to terminate TLS.
Update URL_FRONTEND to your actual production frontend domain so CORS is configured correctly:
MongoDB
MongoDB is not included indocker-compose.yml. The chat feature requires a live MongoDB instance. You have two options:
Without a valid
MONGODB_URI, the parts of the application that rely on MongoDB (real-time chat) will fail at startup or at runtime. Provide this variable even if the feature is not immediately needed.- Create a free or paid cluster at mongodb.com/atlas.
- Whitelist your server’s IP address.
- Copy the connection string and set it in your environment:
Frontend build
For production, build the React client into a static bundle rather than running the Vite dev server.Install dependencies and build
client/dist/. Source maps are enabled by default (build.sourcemap: true in vite.config.js).File uploads
The backend stores uploaded images, PDFs, and videos on the container filesystem via the volume mount defined indocker-compose.yml:
Proyecto_backup/uploads/ on the host into /app/uploads/ inside the container, which matches the UPLOAD_DIR_* environment variables.
Health checking
Backend
The Spring Boot application listens on port8080. If Spring Actuator is on the classpath and enabled, use the health endpoint:
8080 confirms the application is accepting connections.
MySQL
Themysql service in docker-compose.yml does not define a healthcheck, which means the backend may attempt to connect before MySQL is fully ready.
Consider adding a
healthcheck to the mysql service and a depends_on condition on the backend service so that Spring Boot only starts after MySQL is accepting connections.Scaling considerations
The current architecture is designed for single-instance deployment:- WebSocket state is held in-memory. If you run multiple backend instances behind a load balancer, WebSocket connections are not shared between instances. You would need a Redis pub/sub adapter (e.g. Spring’s
RedisMessageBroker) to support horizontal scaling. - File uploads are stored on the local filesystem (see above). Object storage is required for multi-instance deployments.
- MySQL is a single container with no replication. For high availability, use a managed MySQL service (Amazon RDS, PlanetScale, etc.) instead.