Skip to content

Commit

Permalink
Added Dockerfile-related notes
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoli Nicolae <[email protected]>
  • Loading branch information
anatolinicolae committed Mar 25, 2024
1 parent 2b8511e commit 7aa2f96
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,33 @@ This will make sure you have a DATABASE that you are ready to connect to.
docker exec -it shelf npm run setup:seed
```

## Development

> [!NOTE]
> During development involving Dockerfile changes, make sure to **address the correct Dockerfile** in your builds:
> - Fly.io will be built via `Dockerfile`
> - ghcr.io will be built via `Dockerfile.image`
By default both Fly.io and Docker will build via `Dockerfile` unless specifically instructed. Learn more [about Fly.io Config](https://fly.io/docs/reference/configuration/#specify-a-dockerfile) and [Docker image builds](https://docs.docker.com/reference/cli/docker/image/build/#file).

In order to build a local Docker image just as the one we provide for self-hosting, you'll have to build `Dockerfile.image` using buildx as follows:

```sh
docker buildx build \
--platform linux/amd64,linux/arm64 `# use --platform to instruct x86 and ARM build` \
--tag shelf-local \
--file Dockerfile.image .
```

Then running the locally-built image should be as simple as:

```sh
docker run -d \
--name "shelf" \
-e ... `# your env vars` \
shelf-local
```

### ARM processors

You can also run shelf on ARM64 processors.
Expand Down
5 changes: 5 additions & 0 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ The database seed script creates a new user with some data you can use to get st
- Email: `[email protected]`
- Password: `supabase`

> [!NOTE]
> During development involving Dockerfile changes, make sure to **address the correct file** in your builds:
> - Fly.io will be built via `Dockerfile`
> - ghcr.io will be built via `Dockerfile.image`
## Authentication

For authentication to work in your Project, you need so setup some settings related to One Time Passwords in Supabase.
Expand Down

0 comments on commit 7aa2f96

Please sign in to comment.