refactor: phase 2 production requirements
This commit is contained in:
82
README.md
Normal file
82
README.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# dicom-iso
|
||||
|
||||
This repo is a Go service for downloading DICOM studies from PACS, building ISO files, and relaying studies to a CD publisher.
|
||||
|
||||
It replaces the old PHP scripts, which are now kept in `legacy/` only for reference.
|
||||
|
||||
## What is in the repo
|
||||
- `main.go` and `internal/`: the Go application
|
||||
- `pkg/`: lower-level helpers
|
||||
- `config.example.yaml`: config template
|
||||
- `docs/`: project notes
|
||||
- `legacy/`: old PHP scripts and raw reference files
|
||||
|
||||
## Important constraints
|
||||
- no secrets in the repo
|
||||
- no outbound internet in the build environment
|
||||
- restricted package sources
|
||||
|
||||
## Runtime dependencies
|
||||
The service needs:
|
||||
- DCMTK binaries
|
||||
- PACS access
|
||||
- patient API access
|
||||
- CD publisher access
|
||||
- MicroDicom files
|
||||
- writable temp storage
|
||||
|
||||
## Setup
|
||||
Before running the service, make sure the VM has:
|
||||
- Go installed, if you are building on that machine
|
||||
- DCMTK binaries available
|
||||
- MicroDicom files in a real directory
|
||||
- network access to PACS, the patient API, and the CD publisher
|
||||
- a writable temp directory
|
||||
|
||||
Create a local config file from the template:
|
||||
|
||||
```bash
|
||||
cp config.example.yaml config.yaml
|
||||
```
|
||||
|
||||
Then adjust the paths, hosts, ports, and tokens for your environment.
|
||||
|
||||
## Build
|
||||
A normal Go build is enough in a friendly environment:
|
||||
|
||||
```bash
|
||||
go build -o mkiso-server .
|
||||
```
|
||||
|
||||
In production, the build must follow your approved offline package path.
|
||||
This repo should not depend on live public downloads during a restricted build.
|
||||
|
||||
## Run
|
||||
You can run the service directly:
|
||||
|
||||
```bash
|
||||
./mkiso-server
|
||||
```
|
||||
|
||||
Or pass a config path explicitly:
|
||||
|
||||
```bash
|
||||
./mkiso-server /path/to/config.yaml
|
||||
```
|
||||
|
||||
By default, the app looks for `./config.yaml`.
|
||||
|
||||
## Health check
|
||||
After startup, check:
|
||||
|
||||
```bash
|
||||
curl http://127.0.0.1:8080/api/health
|
||||
```
|
||||
|
||||
## Config
|
||||
Use `config.example.yaml` as the starting point.
|
||||
Keep real `config.yaml` local and untracked.
|
||||
|
||||
## More notes
|
||||
- VM deployment: `docs/deployment-vm.md`
|
||||
- nginx example: `docs/reverse-proxy-nginx.md`
|
||||
Reference in New Issue
Block a user