Install with Docker
WeWorks runs as multiple containers in production: PostgreSQL, API, client, landing, and docs.
Requirements
- Docker 20+
- Docker Compose v2
- At least 4 GB RAM recommended (2 GB minimum with swap)
Production Compose (recommended)
Use the docker-compose.yml at the repository root. It pulls pre-built images from GitHub Container Registry:
git clone https://github.com/aetadmin/weworks.git
cd weworks
# Configure API secrets (required)
cp apps/api/.env.example apps/api/.env
# Edit apps/api/.env — set SECRET, JWT_SECRET, STRIPE keys, etc.
docker compose up -dServices and ports
| Service | URL (default) | Port |
|---|---|---|
| Landing (public site) | http://your-server | 80 |
| Client app | http://your-server:3001 | 3001 |
| Documentation | http://your-server:3002 | 3002 |
| API | http://your-server:5003 | 5003 |
| PostgreSQL | internal | 5432 |
In production you typically put nginx or another reverse proxy in front with HTTPS — see Reverse Proxy.
Default credentials
After the API seed runs:
Email: admin@admin.com
Password: 1234Change these immediately after first login.
Environment variables
The API reads apps/api/.env. Minimum required:
DATABASE_URL=postgresql://weworks:WeWorks3133@weworks_postgres:5432/weworks?schema=public
SECRET=your-secret
JWT_SECRET=your-jwt-secret
PORT=5003
FRONTEND_URL=https://client.yourdomain.comClient and landing containers receive NEXT_PUBLIC_API_URL and auth URLs via docker-compose.yml. Update those for your domain before going live.
Health checks
The API container waits for PostgreSQL, runs migrations/seed, then exposes a health check on port 5003. Client and landing wait for a healthy API before starting.
Building images locally
To build instead of pulling from GHCR:
docker compose build
docker compose up -dOr use the root Dockerfile for an all-in-one build (see INSTALL.md in the repo root).
Simple legacy single-container setup
For a minimal trial (single combined image, not the full multi-app stack), see the compose snippet in the root README.md. For new deployments, prefer the multi-service docker-compose.yml above.
Troubleshooting
| Issue | What to check |
|---|---|
| Client shows connection errors | API health: curl http://localhost:5003/ |
| Login fails | Seed completed; check API logs for migration errors |
| Wrong domain redirects | FRONTEND_URL, NEXT_PUBLIC_AUTH_URL, NEXT_PUBLIC_API_URL |
| Out of memory on small VMs | Add 4 GB swap; see INSTALL.md |