Skip to content

Need a bit more of an idiots guide to install this: #3

Description

@DangerDrome

Describe the Improvement

Making a better, step by step installation guide.
For example:

Docker install

Step 1

  • Edit your docker compose file (usually docker-compose.yml)
  • Under "directus:", remove:
image: directus/directus:10.x.x
  • Replace with:
    build:
      context: ./

Step 2

  • Now create a file in the same directory (ideally the root directory of your directus install) and name it "Dockerfile".
  • Edit "Dockerfile" to read like this:
FROM directus/directus:latest

USER root
RUN corepack enable \
 && corepack prepare pnpm@8.9.0 --activate

USER node
RUN pnpm install directus-extension-schema-sync
COPY ./schema-sync ./schema-sync
COPY ./extensions ./extensions

  • Save the "Dockerfile"

Step 3

  • Run the command:
docker compose build

Step 4:

  • Oh snap! it's not working...
[+] Building 3.3s (8/9)                                                                                                                                 docker:default
 => [directus internal] load .dockerignore                                                                                                                        0.2s
 => => transferring context: 2B                                                                                                                                   0.0s
 => [directus internal] load build definition from Dockerfile                                                                                                     0.1s
 => => transferring dockerfile: 268B                                                                                                                              0.0s
 => [directus internal] load metadata for docker.io/directus/directus:latest                                                                                      1.7s
 => CACHED [directus 1/5] FROM docker.io/directus/directus:latest@sha256:92df34786069cc29cf1c7b65f274ff19439dfef02f59f545eb7a62ea6ca8e70f                         0.0s
 => [directus internal] load build context                                                                                                                        0.1s
 => => transferring context: 32B                                                                                                                                  0.0s
 => CANCELED [directus 2/5] RUN corepack enable  && corepack prepare pnpm@8.9.0 --activate                                                                        1.0s
 => CACHED [directus 3/5] RUN pnpm install directus-extension-schema-sync                                                                                         0.0s
 => ERROR [directus 4/5] COPY ./schema-sync ./schema-sync                                                                                                         0.0s
------
 > [directus 4/5] COPY ./schema-sync ./schema-sync:
------
failed to solve: failed to compute cache key: failed to calculate checksum of ref be5a7c65-2ff9-4bdf-bee5-1e16e87afaac::3159k3jw6023qiwp16d661hi1: "/schema-sync": not found

Ok, let's try NPM instead...

NPM Install

Step 1

Run npm install directus-extension-schema-sync in some directory somewhere

Step 2

Then run npx schema-sync install to install the extension's migration and config files, but not the actual extention files? Does this need to be cp'ed manually?

Step 3

Run npx directus database migrate:latest from any random location to run the migration that will add required columns to the... Oh Snap!

ERROR: "DB_CLIENT" Environment Variable is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions