Overview
CompuTécnicos uses environment variables to configure all aspects of the application. Variables are loaded from a.env file in the project root.
Quick Start
Copy the example file and customize it:.env with your specific values.
Application Ports
These variables control which ports the application services use:The port where the main application will be accessible. Access the application at
http://localhost:8080.Port for the MySQL database server. Standard MySQL port is 3306.
Port for phpMyAdmin interface. Access at
http://localhost:8081.Database Configuration
Database connection settings:The MySQL database name. This database must exist before starting the application.
MySQL username for application database access.
Password for the database user.
Root password for MySQL server (Docker only).
PayPal Integration
Configure PayPal payment processing:Your PayPal application Client ID. Obtain this from the PayPal Developer Dashboard.
Your PayPal application Client Secret.
PayPal environment mode. Use
sandbox for testing and production for live transactions.Valid values:sandbox- Test environment with fake transactionsproduction- Live environment with real money
Google OAuth
Enable Google Sign-In functionality:Google OAuth 2.0 Client ID. Obtain from Google Cloud Console.Example:
123456789-abcdefghijklmnop.apps.googleusercontent.comGoogle OAuth 2.0 Client Secret.
Electronic Invoicing
Configure Colombian electronic invoicing providers:Electronic invoicing provider to use.Valid values:
alegra- Alegra invoicing servicesiigo- Siigo invoicing service
Enable simulation mode for testing without creating real invoices.Set to
false in production to generate actual invoices.Alegra Configuration
Alegra API authentication token. Required when
FE_PROVIDER=alegra.Email address associated with your Alegra account.
Siigo Configuration
Siigo OAuth Client ID. Required when
FE_PROVIDER=siigo.Siigo OAuth Client Secret.
Siigo account username for API access.
Siigo account password.
Complete Example
Here’s a complete.env file example:
Environment-Specific Configuration
Development
Production
Security Best Practices
Never Commit .env Files
Add
.env to your .gitignore file to prevent accidentally committing secrets.Rotate Credentials Regularly
Change passwords and API keys periodically, especially after team member changes.
Use Different Credentials per Environment
Never reuse production credentials in development or staging environments.
Validation
Verify your environment variables are loaded correctly:Troubleshooting
Variables Not Loading
If environment variables aren’t being recognized:- Verify the
.envfile exists in the project root - Check file permissions (should be readable by the web server)
- Ensure there are no syntax errors in the
.envfile - Restart your web server or Docker containers after changes
Syntax Errors
Common.env syntax rules:
- No spaces around the
=sign:KEY=value(notKEY = value) - Use quotes for values with spaces:
KEY="value with spaces" - Comments start with
# - Empty values are allowed:
KEY=