Install a server
These steps give you a working server on port 3000. You can try it on localhost straight away. To use it from phones and watches, carry on to Set up HTTPS afterward.
From the published image
Section titled “From the published image”This is the way to run a real server.
-
Make a folder on the Docker host, and put these two files from the repository in it:
compose.yaml, and.env.examplesaved as.env. -
Make a secret. It signs sign-in sessions, and has to be at least 32 characters.
Terminal window openssl rand -base64 32 -
Edit
.env. SetAUTH_SECRETto that secret, and choose the image and a database password:.env LAWFIVE_IMAGE=ghcr.io/roachwork/lawfive:latestAUTH_SECRET=the-secret-you-just-madePOSTGRES_PASSWORD=a-password-of-your-own -
Start it:
Terminal window docker compose pulldocker compose up -d -
Read the setup code from the logs:
Terminal window docker compose logs server -
Open
http://localhost:3000, or the machine’s address, and follow the setup wizard.
Image tags
Section titled “Image tags”| Tag | What it is |
|---|---|
latest |
The newest build from main |
sha-<commit> |
The build of one commit |
| A version | A tagged release, from a v* tag |
From source
Section titled “From source”To build the image yourself, clone the repository and work from its root:
cp .env.example .env # then set AUTH_SECRETdocker compose up -d --builddocker compose logs serverLeave LAWFIVE_IMAGE unset. An image you build this way shows its version as dev unless you pass --build-arg LAWFIVE_VERSION=… --build-arg LAWFIVE_COMMIT=….
Just trying it out
Section titled “Just trying it out”To look around with sample data, with no database or Docker, see the demo server.
- Finish the setup wizard
- Set up HTTPS, which watches and phones need