Skip to Content
dropshelf

Quickstart

Bring up dropshelf on your laptop with Docker, publish a drop and sign in for real.

In this tutorial you run dropshelf on your laptop and publish your first drop. At the end you have a drop live at its own address, the demo drops, and a stack with a real sign-in to explore.

Prerequisites

  • Docker.
  • make.
  • A checkout of the dropshelf core repository.

You need no Node: the container image carries the built dashboard.

Start the stack

The first stack has no sign-in, so you can publish straight away.

  1. From the repository's root, start the stack:

    make compose-up

    This builds the image and brings up MinIO with its bucket, Postgres and one dropshelf container. It waits until dropshelf answers /readyz, then installs the demo drops and prints their addresses.

  2. Open http://drop.localhost:8080. The dashboard opens with no sign-in screen.

This stack runs with auth.provider: none. Every request is one local admin, and a banner on every page says so. Anyone who can reach port 8080 on your machine is that admin, so run it on a network you trust.

If port 8080 is taken, serve the stack on another port:

DROPSHELF_HOST_PORT=18080 make compose-up

Publish your first drop

The repository holds a small website to publish.

  1. Drag the folder test/fixtures/site onto the dashboard.
  2. Select Publish. A few seconds later the drop is live at its own address, under drop.localhost:8080.

Open the demo drops

Two demo drops come up with this stack:

A disabled system user owns them. You are an admin here, and an admin's Home lists every drop, so they appear there beside yours. Delete them from the dashboard whenever you like.

Sign in for real

A second stack puts the same address behind a local Dex identity provider, with the real sign-in flow. It also turns on uploaded assets and company data.

  1. Stop the first stack. This deletes its database and every drop in it:

    make compose-down
  2. Start the Dex stack:

    make compose-dex
  3. Open http://drop.localhost:8080 and sign in as admin@example.com with the password 123.

To see what a member sees, sign in as user@example.com or viewer@example.com with the same password. This stack adds three more demo drops:

Dex keeps its data in memory, so restarting its container starts from a clean slate.

Restart and read the logs

Two more targets help while you explore:

  • make compose-recreate replaces the dropshelf container and nothing else.
  • make compose-logs prints every container's log.

If a stack that was stopped and started again refuses every deploy, see Troubleshoot dropshelf.

Addresses under *.localhost

Every drop is a subdomain, so lunch-votes.drop.localhost:8080 has to resolve to your machine. Chrome, Firefox and Edge do that on their own. Safari relies on the operating system, which does the same on current macOS.

curl does not, so give it the address:

curl -sS --resolve lunch-votes.drop.localhost:8080:127.0.0.1 http://lunch-votes.drop.localhost:8080/

If your browser or resolver does not cooperate, add a hosts entry per drop (127.0.0.1 lunch-votes.drop.localhost). A wildcard rule in a local resolver also works, such as dnsmasq's address=/drop.localhost/127.0.0.1.

Clean up

To stop either stack and remove its volumes, with the database and every drop, run:

make compose-down

Next steps

Last updated .

On this page