Docker
TryPost ships with a working compose.yaml that uses Laravel Sail for a containerized dev environment. The compose file includes PostgreSQL 18, Redis, Mailpit (local SMTP UI), and Selenium for browser tests — no sail:install step needed.
Requirements
- Docker Desktop (Mac, Windows) or Docker Engine (Linux)
- Docker Compose v2
Quick start
1. Clone the repository
git clone https://github.com/trypostit/trypost.git
cd trypost
2. Install Composer dependencies
If you have PHP 8.2+ on your host:
Otherwise use a throwaway container — no PHP install required:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php85-composer:latest \
composer install --ignore-platform-reqs
Update the database and Redis hosts so they point at the Sail containers:
APP_URL=http://localhost
DB_CONNECTION=pgsql
DB_HOST=pgsql
DB_PORT=5432
DB_DATABASE=trypost
DB_USERNAME=sail
DB_PASSWORD=password
REDIS_HOST=redis
4. Start the containers
That brings up laravel.test, pgsql, redis, mailpit, and selenium.
5. Generate the app key
./vendor/bin/sail artisan key:generate
Migrations run as part of the seed step below.
6. Seed default data and create the admin user
Self-hosted installs default to SELF_HOSTED=true, which closes /register. On a fresh database, run this once:
./vendor/bin/sail artisan migrate:fresh --seed && ./vendor/bin/sail artisan db:seed --class=UserSeeder
This rebuilds the schema, runs the default DatabaseSeeder (Passport personal access client + plan rows), and creates the admin user.
migrate:fresh drops every table. Only run it on a brand-new database. If you already have data, run sail artisan db:seed && sail artisan db:seed --class=UserSeeder instead.
Default credentials — change the password on first login:
| Field | Value |
|---|
| Email | admin@trypost.it |
| Password | password |
Additional accounts come from workspace invites (Settings → Members).
7. Install npm packages and build the front-end
./vendor/bin/sail npm install
./vendor/bin/sail npm run build
For active development with hot reload, use sail npm run dev instead.
Accessing TryPost
| Service | URL |
|---|
| TryPost dashboard | http://localhost |
| Mailpit (captured emails) | http://localhost:8025 |
| Postgres | localhost:5432 |
| Redis | localhost:6379 |
Common Commands
# Start containers
./vendor/bin/sail up -d
# Stop containers
./vendor/bin/sail down
# View logs
./vendor/bin/sail logs
# Run Artisan commands
./vendor/bin/sail artisan <command>
# Run npm commands
./vendor/bin/sail npm <command>
# Access PostgreSQL
./vendor/bin/sail psql
# Access Redis CLI
./vendor/bin/sail redis
Running the Queue Worker
For background job processing (publishing, notifications, token refresh):
./vendor/bin/sail artisan horizon
Or run it detached alongside the rest of the stack:
./vendor/bin/sail up -d
./vendor/bin/sail artisan horizon
Shell alias
Add this alias to your shell profile (~/.bashrc, ~/.zshrc) so you can drop the ./vendor/bin/ prefix:
alias sail='./vendor/bin/sail'
Then:
sail up -d
sail artisan migrate
sail npm run dev
Production with Docker
The shipped compose.yaml is tuned for development (debug mode, Mailpit, Selenium). For production:
- Use a slimmer compose file without Selenium/Mailpit and with persistent named volumes for
storage/app and Postgres data
- Set
APP_ENV=production, APP_DEBUG=false
- Terminate SSL at a reverse proxy (Nginx, Traefik, Caddy)
- Configure long-running supervisors for Horizon, Reverb, and the Laravel scheduler — see Production setup
Troubleshooting
Port conflicts
If port 80 is already in use, change APP_PORT in .env:
Permission issues
On Linux you may need:
Database connection refused
Make sure the database container is healthy:
Give Postgres a few seconds to initialize on first boot.