Install with Docker

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)

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 -d

Services and ports

ServiceURL (default)Port
Landing (public site)http://your-server80
Client apphttp://your-server:30013001
Documentationhttp://your-server:30023002
APIhttp://your-server:50035003
PostgreSQLinternal5432

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: 1234

Change 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.com

Client 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 -d

Or 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

IssueWhat to check
Client shows connection errorsAPI health: curl http://localhost:5003/
Login failsSeed completed; check API logs for migration errors
Wrong domain redirectsFRONTEND_URL, NEXT_PUBLIC_AUTH_URL, NEXT_PUBLIC_API_URL
Out of memory on small VMsAdd 4 GB swap; see INSTALL.md