An empty Directus project that can be setup with the database and assets stored on either your local machine or via Supabase.
Open your terminal and checkout the project via git, the run the following commands inside the directory:
mkdir uploads
cp docker-compose-local.yml docker-compose.yml
docker compose build
docker compose up -d
You will then be able to login to directus at the following link (see docker compose file for admin details): http://localhost:8055/admin/login
First run the following commands:
cp .env.example .env
cp docker-compose-supabase.yml docker-compose.yml
- Create a Supabase account by signing in with GitHub.
- Give your organization a name (this can be changed later).
- Click New Project and select your organization.
- Follow the prompts, setting a project Name, Database Password, Region, and Pricing Plan, then click Create New Project.
- After your project has been provisioned, navigate to Settings > Database in the sidebar.
- Scroll down to Connection Info and take note of your database's Host, Database Name, Port, User, and Password. You will need to enter this during your Directus project setup.
- Copy these values into the appropriate variables in your .env file
- From the sidebar, navigate to Database > Extensions.
- Use the search bar to look up PostGIS.
- Toggle the PostGIS option to enable it.
- Setup a bucket: https://supabase.com/docs/guides/storage/quickstart
- Set the value of STORAGE_SUPABASE_BUCKET as the name of your bucket created in step 1.
- Set the value of STORAGE_SUPABASE_PROJECT_ID to the Reference ID of you Supabase project which can be found in the General section of your Project Settings
- Set the value of STORAGE_SUPABASE_SERVICE_ROLE to the value of the service_role secret of you Supabase project which can be found in the API Settings section of Project Settings
Once you have all the env vars set you can start your project:
docker compose up -d