Skip to content

Commit 8a1e7d8

Browse files
authored
v1.5.0 — one-command fresh install (#47)
1 parent 72f0dbf commit 8a1e7d8

6 files changed

Lines changed: 362 additions & 51 deletions

File tree

.github/workflows/ci.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,78 @@ jobs:
5252
# "slow step failed" rather than masking the fast ones.
5353
run: pytest -v tests/test_fresh_install.py -m slow
5454

55+
fresh-install-docker:
56+
# Docker E2E: generates compose from template, starts the full
57+
# Immich stack, validates API + detection. Runs on Ubuntu where
58+
# Docker is pre-installed (macOS runners can't run Docker VMs).
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
with:
63+
submodules: true
64+
- uses: actions/setup-python@v5
65+
with:
66+
python-version: "3.11"
67+
- name: Generate compose from template
68+
run: |
69+
python3 -c "
70+
import sys, os, secrets
71+
from pathlib import Path
72+
sys.path.insert(0, '.')
73+
from immich_accelerator.__main__ import _COMPOSE_TEMPLATE
74+
test_dir = Path('/tmp/fresh-install-ci')
75+
test_dir.mkdir(parents=True, exist_ok=True)
76+
photos = '/tmp/test-photos'
77+
os.makedirs(photos, exist_ok=True)
78+
data = str(test_dir / 'data')
79+
os.makedirs(data, exist_ok=True)
80+
compose = _COMPOSE_TEMPLATE.replace('{photos_mount}', f'{photos}:{photos}:ro')
81+
(test_dir / 'docker-compose.yml').write_text(compose)
82+
pw = secrets.token_urlsafe(24)
83+
env = f'UPLOAD_LOCATION={data}\nDB_PASSWORD={pw}\nDB_HOSTNAME=immich_postgres\nDB_USERNAME=postgres\nDB_DATABASE_NAME=immich\nREDIS_HOSTNAME=immich_redis\n'
84+
(test_dir / '.env').write_text(env)
85+
print('Compose generated')
86+
"
87+
- name: Validate compose syntax
88+
run: docker compose -f /tmp/fresh-install-ci/docker-compose.yml config > /dev/null
89+
- name: Start Immich stack
90+
run: |
91+
cd /tmp/fresh-install-ci
92+
docker compose up -d
93+
echo "Waiting for API..."
94+
for i in $(seq 1 90); do
95+
if curl -sf http://localhost:2283/api/server/ping 2>/dev/null | grep -q pong; then
96+
echo "API up after ${i}x3s"
97+
break
98+
fi
99+
sleep 3
100+
done
101+
curl -sf http://localhost:2283/api/server/ping | grep -q pong || { echo "API never came up"; docker logs immich_server; exit 1; }
102+
- name: Verify all containers running
103+
run: |
104+
docker ps --format "{{.Names}}\t{{.Status}}" | grep immich
105+
[ $(docker ps --format "{{.Names}}" | grep -c immich) -eq 3 ] || { echo "Not all containers running"; exit 1; }
106+
- name: Verify setup detection
107+
run: |
108+
python3 -c "
109+
import sys
110+
sys.path.insert(0, '.')
111+
from immich_accelerator.__main__ import detect_immich
112+
immich = detect_immich('docker')
113+
assert immich['version'], 'no version'
114+
assert immich['workers_include'] == 'api', f'wrong workers: {immich[\"workers_include\"]}'
115+
assert immich.get('media_location'), 'no media_location'
116+
print(f'Detected: v{immich[\"version\"]}, workers={immich[\"workers_include\"]}')
117+
print(f'Media: {immich[\"media_location\"]}')
118+
print('Detection: OK')
119+
"
120+
- name: Tear down
121+
if: always()
122+
run: cd /tmp/fresh-install-ci && docker compose down -v 2>/dev/null || true
123+
55124
auto-tag:
56125
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
57-
needs: [lint, fresh-install-macos]
126+
needs: [lint, fresh-install-macos, fresh-install-docker]
58127
runs-on: ubuntu-latest
59128
permissions:
60129
contents: write

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.5.0 — 2026-05-19
4+
5+
### Features
6+
- **One-command fresh install.** `immich-accelerator setup` on a bare Mac now sets up everything — installs OrbStack if no Docker is found, creates the Immich Docker stack, configures the native worker, and starts all services. Two questions: where your photos are, where Immich should store its data. No manual docker-compose editing.
7+
- **Managed Docker stack.** The generated compose file lives at `~/.immich-accelerator/docker/`. Re-running setup detects it and restarts if stopped, without re-prompting.
8+
39
## 1.4.13 — 2026-05-18
410

511
### Fixes

README.md

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -43,67 +43,32 @@ The microservices worker is extracted directly from your running Immich Docker i
4343
## Requirements
4444

4545
- macOS on Apple Silicon (M1/M2/M3/M4)
46-
- Immich already running in Docker (on this Mac or a remote host like a NAS)
47-
- [Homebrew](https://brew.sh) (setup will offer to install Node.js and libvips if missing)
48-
- Python 3.11+ for the ML service
46+
- [Homebrew](https://brew.sh)
4947

50-
> **FFmpeg:** Downloaded automatically during setup ([jellyfin-ffmpeg](https://github.com/jellyfin/jellyfin-ffmpeg) — the same ffmpeg Immich uses in Docker).
48+
That's it. Setup installs everything else (Docker, Node.js, ffmpeg, ML dependencies).
5149

5250
## Quick start
5351

54-
### 1. Install and run setup
55-
5652
```bash
5753
brew tap epheterson/immich-accelerator
5854
brew install immich-accelerator
5955
immich-accelerator setup
6056
```
6157

62-
Or from source:
63-
64-
```bash
65-
git clone --recursive https://github.com/epheterson/immich-apple-silicon.git
66-
cd immich-apple-silicon
67-
python3 -m immich_accelerator setup
68-
```
69-
70-
Setup handles everything: installs dependencies, downloads jellyfin-ffmpeg, creates the ML service venv, extracts the server from Docker, and guides you through the docker-compose changes.
71-
72-
For NAS + Mac or manual setups, see [Split deployment](#split-deployment-nas--mac) below.
73-
74-
### 2. Configure Docker
75-
76-
The setup command prints the required changes. The key settings:
77-
78-
```yaml
79-
services:
80-
immich-server:
81-
environment:
82-
- IMMICH_WORKERS_INCLUDE=api
83-
- IMMICH_MACHINE_LEARNING_URL=http://host.internal:3003 # OrbStack
84-
# Docker Desktop: use http://host.docker.internal:3003 instead
85-
- IMMICH_MEDIA_LOCATION=/your/upload/path
86-
volumes:
87-
# IMPORTANT: use the same absolute path on both sides (not the Docker default)
88-
- /your/upload/path:/your/upload/path
89-
- /your/photos:/your/photos:ro
90-
```
91-
92-
Then: `docker compose up -d`
58+
If no Docker is found, setup offers to install [OrbStack](https://orbstack.dev). If no Immich is running, setup creates the entire Docker stack for you — just answer two questions:
9359

94-
### Understanding path mapping
60+
1. **Where are your photos?** (e.g., `~/Pictures`) — mounted read-only for Immich to import
61+
2. **Where should Immich store its data?** (e.g., `~/.immich-accelerator/data`) — thumbnails, transcoded video, backups
9562

96-
Immich stores absolute file paths in Postgres. Docker and the native worker must resolve those paths to the same files. `IMMICH_MEDIA_LOCATION` is the lever: set it to the real host path (like `/Users/you/immich/upload`) and mount that same path inside Docker with `-v /Users/you/immich/upload:/Users/you/immich/upload`. Both sides now see the same bytes at the same path.
63+
Setup generates the docker-compose, starts Immich, extracts the native worker, and starts everything. Open `http://localhost:2283` to create your admin account.
9764

98-
Setup detects your upload directory and tells you exactly what to use. For cross-machine setups see [Split deployment](#split-deployment-nas--mac-or-any-two-hosts) — the requirements are stricter.
65+
For existing Immich installs, setup detects the running containers and configures the accelerator to work alongside them.
9966

100-
### 3. Start the accelerator
67+
For NAS + Mac setups, see [Split deployment](#split-deployment-nas--mac) below.
10168

102-
```bash
103-
immich-accelerator start
104-
```
69+
### Understanding `IMMICH_MEDIA_LOCATION`
10570

106-
Starts the native microservices worker and ML service. Immich's web UI works as usual. Uploads go through Docker's API, compute happens natively.
71+
This is the directory Immich uses as its media root. It contains these subdirectories: `upload/`, `thumbs/`, `encoded-video/`, `library/`, `profile/`, `backups/`. Both Docker and the native worker must see this directory at the same absolute path. Setup handles this automatically for same-machine installs.
10772

10873
## Commands
10974

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.13
1+
1.5.0

0 commit comments

Comments
 (0)