use published image in quick start
This commit is contained in:
@@ -17,8 +17,11 @@ cp config.example.toml config.toml
|
|||||||
# Set a private api_key in config.toml.
|
# Set a private api_key in config.toml.
|
||||||
|
|
||||||
mkdir -p data
|
mkdir -p data
|
||||||
USHORT_UID="$(id -u)" USHORT_GID="$(id -g)" \
|
USHORT_CONFIG="$PWD/config.toml" \
|
||||||
docker compose -f deploy/docker-compose.build.yml up --build -d
|
USHORT_DATA="$PWD/data" \
|
||||||
|
USHORT_UID="$(id -u)" \
|
||||||
|
USHORT_GID="$(id -g)" \
|
||||||
|
docker compose -f deploy/docker-compose.prod.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
The example starts ushort at <http://localhost:18082/s/> and stores its SQLite
|
The example starts ushort at <http://localhost:18082/s/> and stores its SQLite
|
||||||
@@ -28,12 +31,24 @@ Check it and stop it with:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl http://localhost:18082/s/api/health
|
curl http://localhost:18082/s/api/health
|
||||||
docker compose -f deploy/docker-compose.build.yml down
|
docker compose -f deploy/docker-compose.prod.yml down
|
||||||
```
|
```
|
||||||
|
|
||||||
For a production server, use the published image through
|
This pulls the published image; it does not compile ushort or require a Rust
|
||||||
`deploy/docker-compose.prod.yml`; it does not build or require a source
|
toolchain.
|
||||||
checkout.
|
|
||||||
|
## Build from source instead
|
||||||
|
|
||||||
|
To build the current checkout locally, use the alternative build definition:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p data
|
||||||
|
USHORT_UID="$(id -u)" USHORT_GID="$(id -g)" \
|
||||||
|
docker compose -f deploy/docker-compose.build.yml up --build -d
|
||||||
|
```
|
||||||
|
|
||||||
|
It uses the same root-level `config.toml` and `data/` directory as the quick
|
||||||
|
start.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:18082:8080"
|
- "127.0.0.1:18082:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.toml:/app/config.toml:ro
|
- "${USHORT_CONFIG:-./config.toml}:/app/config.toml:ro"
|
||||||
- ./data:/app/data
|
- "${USHORT_DATA:-./data}:/app/data"
|
||||||
user: "1001:1001"
|
user: "${USHORT_UID:-1001}:${USHORT_GID:-1001}"
|
||||||
read_only: true
|
read_only: true
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
|
|||||||
+2
-1
@@ -18,7 +18,8 @@ USHORT_UID="$(id -u)" USHORT_GID="$(id -g)" \
|
|||||||
|
|
||||||
The production definition,
|
The production definition,
|
||||||
[`deploy/docker-compose.prod.yml`](../deploy/docker-compose.prod.yml), never
|
[`deploy/docker-compose.prod.yml`](../deploy/docker-compose.prod.yml), never
|
||||||
builds source. It pulls the published version instead.
|
builds source. It pulls the published version instead and is therefore the
|
||||||
|
recommended quick-start path in the root README.
|
||||||
|
|
||||||
## Automated tests
|
## Automated tests
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user