mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-10-16 18:54:05 +00:00
Add Docker Compose support for Topola Viewer
This commit is contained in:
@@ -26,6 +26,10 @@ in the project:
|
||||
### Build & Environment
|
||||
|
||||
- **[.env](.env)**: Contains environment variables for the project.
|
||||
- **[docker-compose.yml](docker-compose.yml)**: Runs the published GHCR image
|
||||
using Docker Compose.
|
||||
- **[docker-compose.build.yml](docker-compose.build.yml)**: Builds and runs the
|
||||
application from local source using Docker Compose.
|
||||
- **[vite.config.mts](vite.config.mts)**: Configuration file for the Vite build
|
||||
tool.
|
||||
|
||||
|
||||
40
README.md
40
README.md
@@ -217,9 +217,45 @@ build a Topola Genealogy Viewer package bundled together with a GEDCOM file.
|
||||
## Docker Container Deployment
|
||||
|
||||
Topola Viewer can be run locally or deployed to standard cloud environments
|
||||
using Docker.
|
||||
using Docker and Docker Compose.
|
||||
|
||||
### Running Topola Viewer
|
||||
### Running with Docker Compose
|
||||
|
||||
To pull and run the official published image
|
||||
(`ghcr.io/pewu/topola-viewer:latest`) using Docker Compose:
|
||||
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
To build from local source and start:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.build.yml up
|
||||
```
|
||||
|
||||
To force a rebuild from source and start:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.build.yml up --build
|
||||
```
|
||||
|
||||
#### Custom Port and Static URL
|
||||
|
||||
You can customize the host port (`PORT`, default: `8080`) and pre-load a static
|
||||
tree URL (`STATIC_URL`) using environment variables or a `.env` file:
|
||||
|
||||
```bash
|
||||
PORT=3000 STATIC_URL=https://example.org/sample.ged docker compose up
|
||||
```
|
||||
|
||||
Or when building from source:
|
||||
|
||||
```bash
|
||||
PORT=3000 STATIC_URL=https://example.org/sample.ged docker compose -f docker-compose.build.yml up
|
||||
```
|
||||
|
||||
### Running Topola Viewer with Docker
|
||||
|
||||
To pull and run Topola Viewer:
|
||||
|
||||
|
||||
11
docker-compose.build.yml
Normal file
11
docker-compose.build.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
topola-viewer:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
image: topola-viewer
|
||||
container_name: topola-viewer
|
||||
ports:
|
||||
- '${PORT:-8080}:8080'
|
||||
environment:
|
||||
- STATIC_URL=${STATIC_URL:-}
|
||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
topola-viewer:
|
||||
image: ghcr.io/pewu/topola-viewer:latest
|
||||
container_name: topola-viewer
|
||||
ports:
|
||||
- '${PORT:-8080}:8080'
|
||||
environment:
|
||||
- STATIC_URL=${STATIC_URL:-}
|
||||
Reference in New Issue
Block a user