Document in main README

This commit is contained in:
Manav Rathi 2024-03-27 13:43:44 +05:30
parent 741c968c8a
commit e803b7f053
No known key found for this signature in database
3 changed files with 33 additions and 16 deletions

View file

@ -38,7 +38,13 @@ And ping again
This time you'll see the updated message. This time you'll see the updated message.
For more details about how to get museum up and running, see For more details about how to get museum up and running, see
[RUNNING.md](RUNNING.md). [RUNNING](RUNNING.md).
> [!TIP]
>
> Also, there is a way to use our pre-built Docker images to directly start a
> cluster without needing to clone this repository - see
> [docs/docker](docs/docker.md).
## Architecture ## Architecture
@ -84,10 +90,11 @@ And it is built with containerization in mind - both during development and
deployment. Just use the provided Dockerfile, configure to taste and you're off deployment. Just use the provided Dockerfile, configure to taste and you're off
to the races. to the races.
> [!CAUTION] Overall, there are [three approaches](RUNNING.md) you can take:
>
> We don't publish any official docker images (yet). For self-hosters, the * Run using Docker using a pre-built Docker image
> recommendation is to build your own image using the provided `Dockerfile`. * Run using Docker but build an image from source
* Run without Docker
Everything that you might needed to run museum is all in here, since this is the Everything that you might needed to run museum is all in here, since this is the
setup we ourselves use in production. setup we ourselves use in production.

View file

@ -8,13 +8,14 @@ environment that doesn't clutter your machine.
You can also run museum directly on your machine if you wish - it is a single You can also run museum directly on your machine if you wish - it is a single
static go binary. static go binary.
This document describes both these approaches, and also outlines configuration. This document describes these approaches, and also outlines configuration.
- [Running using Docker](#docker) - [Run using Docker using a pre-built Docker image](docs/docker.md)
- [Running without Docker](#without-docker) - [Run using Docker but build an image from source](#build-and-run-using-docker)
- [Running without Docker](#run-without-docker)
- [Configuration](#configuration) - [Configuration](#configuration)
## Docker ## Build and run using Docker
Start the cluster Start the cluster
@ -70,7 +71,7 @@ Each time museum gets rebuilt from source, a new image gets created but the old
one is retained as a dangling image. You can use `docker image prune --force`, one is retained as a dangling image. You can use `docker image prune --force`,
or `docker system prune` if that's fine with you, to remove these. or `docker system prune` if that's fine with you, to remove these.
## Without Docker ## Running without Docker
The museum binary can be run by using `go run cmd/museum/main.go`. But first, The museum binary can be run by using `go run cmd/museum/main.go`. But first,
you'll need to prepare your machine for development. Here we give the steps, you'll need to prepare your machine for development. Here we give the steps,
@ -132,7 +133,7 @@ pg_ctl -D /usr/local/var/postgres -l logfile start
createuser -s postgres createuser -s postgres
``` ```
## Start museum ### Start museum
```sh ```sh
export ENTE_DB_USER=postgres export ENTE_DB_USER=postgres
@ -148,7 +149,7 @@ ENTE_DB_USER=ente_user
air air
``` ```
## Testing ### Testing
Set up a local database for testing. This is not required for running the server. Set up a local database for testing. This is not required for running the server.
Create a test database with the following name and credentials: Create a test database with the following name and credentials:

View file

@ -52,7 +52,7 @@ require you to clone the repository or build any images.
touch museum.yaml touch museum.yaml
``` ```
4. That is all. You can now start everything. 5. That is all. You can now start everything.
```sh ```sh
docker compose up docker compose up
@ -66,9 +66,18 @@ This will start a cluster containing:
For each of these, it'll use the latest published Docker image. For each of these, it'll use the latest published Docker image.
Alternatively, if you only want to run Ente's server, you can directly pull and You can do a quick smoke test by pinging the API:
run the image we publish to **`ghcr.io/ente-io/server`**.
```sh ```sh
docker pull ghcr.io/ente-io/server:latest curl localhost:8080/ping
```
## Only the server
Alternatively, if you have setup the database and object storage externally and
only want to run Ente's server, you can skip the steps above and directly pull
and run the image from **`ghcr.io/ente-io/server`**.
```sh
docker pull ghcr.io/ente-io/server
``` ```