The SearchJobs backend is configured entirely through environment variables. Docker Compose reads these from aDocumentation 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.
.env file in the repository root and injects them into the springboot-app container at startup. This page lists every variable, explains its purpose, and provides a complete sample file you can copy and customise.
Backend variables
These variables are consumed by the Spring Boot application. All of them must be present in your.env file — the backend will fail to start if any required variable is missing.
| Variable | Description | Example value |
|---|---|---|
SPRING_DATASOURCE_URL | JDBC connection URL for MySQL. Use the Docker service hostname mysql when running inside Compose. | jdbc:mysql://mysql:3306/mydb |
SPRING_DATASOURCE_USERNAME | MySQL user that Spring Boot connects as. | root |
SPRING_DATASOURCE_PASSWORD | Password for the MySQL user. The Compose file hard-codes an empty string for local dev. | (empty) |
SPRING_JPA_HIBERNATE_DDL_AUTO | Controls how Hibernate manages the schema on startup. Use update for development, validate or none for production. | update |
MY_SECRET_KEY | Secret used to sign JWT tokens. Must be kept private. A minimum of 32 characters is recommended; use 64 for stronger security. | (random hex string) |
JWT_EXPIRATION | JWT token lifetime in milliseconds. 86400000 equals 24 hours. | 86400000 |
MONGODB_URI | MongoDB connection string for the chat/messaging feature. MongoDB is not included in docker-compose.yml — use MongoDB Atlas or a standalone container. | mongodb://localhost:27017/chatdb |
UPLOAD_DIR_IMG | Absolute path inside the container where image uploads are stored. Matches the volume mount /app/uploads. | /app/uploads/images/ |
UPLOAD_DIR_PDF | Absolute path inside the container for PDF uploads. | /app/uploads/pdfs/ |
UPLOAD_DIR_VIDEO | Absolute path inside the container for video uploads. | /app/uploads/videos/ |
URL_FRONTEND | Frontend origin used for CORS configuration. Must match the URL your browser uses to reach the React app. | http://localhost:5173 |
MySQL service variables (docker-compose.yml)
Themysql service is configured directly inside docker-compose.yml and does not read from .env. These values are fixed for local development:
| Variable | Value | Notes |
|---|---|---|
MYSQL_DATABASE | mydb | The database created automatically on first start. Your SPRING_DATASOURCE_URL must reference this name. |
MYSQL_ALLOW_EMPTY_PASSWORD | yes | Allows the root user to connect with no password. Change this for any non-local environment. |
Sample .env file
Copy the block below to a file named.env in the repository root and replace the placeholder values before running docker-compose up.
The
.env file is excluded from version control by .gitignore (**/.env*). Do not rename it or move it out of the repository root — Docker Compose expects to find it there via the env_file: - .env directive on the backend service.