Skip to content

Commit 2717078

Browse files
committed
#1
0 parents  commit 2717078

File tree

3 files changed

+172
-0
lines changed

3 files changed

+172
-0
lines changed

.github/workflows/ubuntu.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Immich Setup & Verification
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
setup_and_verify_immich:
8+
runs-on: ubuntu-24.04 # Specifies the base Ubuntu 24.04 image
9+
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Install Docker and Docker Compose
15+
uses: docker/setup-buildx-action@v3 # This action conveniently installs Docker and Docker Compose v2 (docker compose)
16+
17+
- name: Log in to GitHub Container Registry (GHCR)
18+
# Use the built-in GITHUB_TOKEN to authenticate with GHCR
19+
# This is essential for pulling images from ghcr.io if rate limited or private
20+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
21+
22+
- name: Start Immich services
23+
# Change working-directory to where your docker-compose.yml and .env are located
24+
working-directory: docker-configs/immich
25+
run: |
26+
echo "Starting Immich services with docker compose from $(pwd)..."
27+
# Ensure volumes are created if not already
28+
docker compose pull # Pull images first to ensure they are the specified version
29+
docker compose up -d
30+
31+
- name: Wait for Immich to fully initialize
32+
run: |
33+
echo "Sleeping for 30 seconds before verification..."
34+
sleep 60
35+
36+
- name: Verify Immich API is up and running
37+
run: |
38+
echo "Verifying Immich API..."
39+
# The API server runs on IMMICH_SERVER_PORT (2283 by default) as defined in .env
40+
curl -f -s http://localhost:2283/api/server/ping
41+
if [ $? -eq 0 ]; then
42+
echo "Immich API service is up and running!"
43+
else
44+
echo "Immich API service failed to respond!"
45+
exit 1
46+
fi
47+
48+
- name: Verify Immich Web UI is accessible
49+
run: |
50+
echo "Verifying Immich Web UI..."
51+
# The web UI runs on IMMICH_WEB_PORT (8080 by default) as defined in .env
52+
curl -f -s http://localhost:8080/
53+
if [ $? -eq 0 ]; then
54+
echo "Immich Web UI is accessible!"
55+
else
56+
echo "Immich Web UI failed to respond!"
57+
exit 1
58+
fi
59+
60+
- name: Display running Docker containers (for debugging)
61+
if: always() # Run even if previous steps fail
62+
run: docker ps -a
63+
64+
- name: Display Docker Compose logs (for debugging)
65+
if: always() # Run even if previous steps fail
66+
working-directory: docker-configs/immich
67+
run: docker compose logs

docker-configs/immich/.env

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
IMMICH_VERSION="v1.140.0"
2+
3+
# Database settings
4+
DB_HOSTNAME=postgres
5+
DB_USERNAME=immich
6+
DB_PASSWORD=immich_secure_password # IMPORTANT: Use a strong password in production
7+
DB_DATABASE=immich_db
8+
9+
# Redis settings
10+
# REDIS_HOSTNAME=redis
11+
#
12+
# # Immich ports (exposed on the host)
13+
IMMICH_WEB_PORT=8080 # For the web interface
14+
IMMICH_SERVER_PORT=2283 # For the API backend
15+
#
16+
# # Internal container path for uploads (mapped via volume)
17+
UPLOAD_LOCATION=/tmp/
18+
DB_DATA_LOCATION=/tmp/db
19+
DB_DATABASE_NAME="immich_db"
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# RNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose
2+
#
3+
# Make sure to use the docker-compose.yml of the current release:
4+
#
5+
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
6+
#
7+
# The compose file on main may not be compatible with the latest release.
8+
9+
name: immich
10+
11+
services:
12+
immich-server:
13+
container_name: immich_server
14+
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
15+
# extends:
16+
# file: hwaccel.transcoding.yml
17+
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
18+
volumes:
19+
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
20+
- ${UPLOAD_LOCATION}:/data
21+
- /etc/localtime:/etc/localtime:ro
22+
env_file:
23+
- .env
24+
ports:
25+
- '2283:2283'
26+
depends_on:
27+
- redis
28+
- postgres
29+
restart: always
30+
healthcheck:
31+
disable: false
32+
33+
immich-web:
34+
container_name: immich_web
35+
image: ghcr.io/immich-app/immich-web:main # Your chosen version
36+
env_file:
37+
- .env
38+
ports:
39+
- "8080:3000" # Explicitly map host port 8080 to container port 8080
40+
depends_on:
41+
immich-server:
42+
condition: service_started
43+
restart: always
44+
45+
immich-machine-learning:
46+
container_name: immich_machine_learning
47+
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
48+
# Example tag: ${IMMICH_VERSION:-release}-cuda
49+
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
50+
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
51+
# file: hwaccel.ml.yml
52+
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
53+
volumes:
54+
- model-cache:/cache
55+
env_file:
56+
- .env
57+
restart: always
58+
healthcheck:
59+
disable: false
60+
61+
redis:
62+
container_name: immich_redis
63+
image: docker.io/valkey/valkey:8-bookworm@sha256:a137a2b60aca1a75130022d6bb96af423fefae4eb55faf395732db3544803280
64+
healthcheck:
65+
test: redis-cli ping || exit 1
66+
restart: always
67+
68+
postgres:
69+
container_name: immich_postgres
70+
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:32324a2f41df5de9efe1af166b7008c3f55646f8d0e00d9550c16c9822366b4a
71+
environment:
72+
POSTGRES_PASSWORD: ${DB_PASSWORD}
73+
POSTGRES_USER: ${DB_USERNAME}
74+
POSTGRES_DB: ${DB_DATABASE_NAME}
75+
POSTGRES_INITDB_ARGS: '--data-checksums'
76+
# Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
77+
DB_STORAGE_TYPE: 'HDD'
78+
volumes:
79+
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
80+
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
81+
shm_size: 128mb
82+
restart: always
83+
84+
volumes:
85+
model-cache:
86+

0 commit comments

Comments
 (0)