Contributing¶
Development Environment¶
The dev environment uses Docker with PostgreSQL and Redis. It runs on port 8080 to avoid conflicting with a production instance.
Prerequisites¶
- Docker and Docker Compose v2
- Git
Setup¶
git clone https://github.com/TechnicPack/TechnicSolder.git
cd TechnicSolder
docker compose -f compose.dev.yml up -d
The container entrypoint (docker/dev-entrypoint.sh) runs on every start and handles:
- Installs all Composer dependencies (including dev dependencies)
- On first run only: creates a
.envfrom.env.examplewith dev defaults (APP_ENV=local,APP_DEBUG=true,DB_CONNECTION=pgsql,DB_HOST=postgres,CACHE_STORE=redis,SESSION_DRIVER=redis) and generates anAPP_KEY - Runs database migrations
- Conditionally builds frontend assets (only if
public/build/is missing and Node is available in the container) - Sets file permissions
Solder is then available at http://localhost:8080.
Create the Admin User¶
The dev setup does not automatically create an admin user. Run this after the first boot:
This will prompt for an email and password interactively.
How It Differs from Production¶
Production (compose.yml) |
Development (compose.dev.yml) |
|
|---|---|---|
| Port | 80 | 8080 |
| Database | MariaDB | PostgreSQL |
| Dev dependencies | Excluded (--no-dev) |
Included |
APP_DEBUG |
false |
true |
APP_ENV |
production |
local |
| Vendor directory | Inside container | Named volume (persists across rebuilds) |
| Cache/session | Valkey | Redis |
The named vendor volume means vendor/ lives inside Docker, not on your host filesystem. This avoids cross-platform filesystem issues and speeds up autoloading. PostgreSQL data is also persisted in a named postgres_data volume.
Common Commands¶
All commands run inside the container via docker compose -f compose.dev.yml exec solder:
# Run the test suite
docker compose -f compose.dev.yml exec solder php artisan test
# Run a specific test class
docker compose -f compose.dev.yml exec solder php artisan test --filter=ApiTest
# Code style fixing (Laravel Pint)
docker compose -f compose.dev.yml exec solder ./vendor/bin/pint
# Static analysis (Larastan/PHPStan)
docker compose -f compose.dev.yml exec solder ./vendor/bin/phpstan
# Install/update Composer dependencies
docker compose -f compose.dev.yml exec solder composer install
# Run database migrations
docker compose -f compose.dev.yml exec solder php artisan migrate
# Open a shell inside the container
docker compose -f compose.dev.yml exec solder bash
Tip
You can alias dc to docker compose -f compose.dev.yml in your shell to save typing.
Testing¶
Tests use an in-memory SQLite database configured in .env.testing — they don't touch your development database.
Code Style¶
This project uses Laravel Pint for code formatting. Run it before submitting a pull request:
Static Analysis¶
Larastan (PHPStan for Laravel) is used for static analysis:
Pull Requests¶
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests, Pint, and PHPStan
- Submit a pull request