postgres
: PostgreSQL databaseredis
: Redis message brokerprefect-server
: Prefect serverprefect-services
: Prefect background servicesprefect-worker
: Prefect worker
Docker Compose file
Create acompose.yml
file with the following contents:
Running the stack
-
Save the
compose.yml
file to your local machine. - From the directory containing the file, start the stack by running:
- Wait for all services to start (it may take a few moments).
- Open your browser and navigate to http://localhost:4200 to access the Prefect UI.
- To stop the stack, run:
Notes
- The PostgreSQL database is preconfigured with user and database
prefect
. - Redis is not strictly required but is recommended as the messaging broker when scaling a Prefect server installation.
- The Prefect worker automatically registers a pool named
local-pool
. - The Prefect server exposes the API on port 4200; ensure this port is free.
- Use
docker compose logs -f
to view live logs for all services. - This
compose.yml
does not configure authentication. See the authentication guide for more information.
Troubleshooting
- If the UI does not load, verify that port 4200 is not occupied by another process.
- Check container logs for errors with:
- Make sure Docker and Docker Compose are installed and up to date.
For more information, see the official Prefect documentation.