mirror of
https://github.com/atareao/self-hosted.git
synced 2024-06-13 02:54:02 +02:00
immich
This commit is contained in:
parent
adafd12b63
commit
4e7c4bef86
29
immich/README.md
Normal file
29
immich/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Installation
|
||||
|
||||
```
|
||||
git clone https://github.com/atareao/self-hosted.git
|
||||
cd self-hosted/immich
|
||||
mv sample.env .env
|
||||
sed -i "s/immich.tuservidor.es/el_fqdn_que_quieras/g" .env
|
||||
```
|
||||
|
||||
Crea un valor para `JWT_SECRET`, para ello, tienes que utilizar el siguiente comando,
|
||||
|
||||
```
|
||||
openssl rand -base64 128
|
||||
```
|
||||
|
||||
A la hora de levantar el servicio dependerá del proxy inverso que hayas seleccionado. Si has elegido Caddy, simplemente,
|
||||
|
||||
```
|
||||
docker-compose -f docker-compose.yml -f docker-compose.caddy.yml up -d
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
Mientras que si has elegido Traefik,
|
||||
|
||||
```
|
||||
docker-compose -f docker-compose.yml -f docker-compose.traefik.yml up -d
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
13
immich/docker-compose.caddy.yml
Normal file
13
immich/docker-compose.caddy.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
immich-proxy:
|
||||
networks:
|
||||
- proxy
|
||||
labels:
|
||||
- caddy="${FQDN}"
|
||||
- caddy.reverse_proxy="{{upstreams 8080}}"
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
21
immich/docker-compose.traefik.yml
Normal file
21
immich/docker-compose.traefik.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
immich-proxy:
|
||||
networks:
|
||||
- proxy
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.services.immich.loadbalancer.server.port=8080
|
||||
- traefik.http.routers.immich.entrypoints=web
|
||||
- traefik.http.routers.immich.rule=Host(`${FQDN}`)
|
||||
- traefik.http.middlewares.immich-https-redirect.redirectscheme.scheme=websecure
|
||||
- traefik.http.routers.immich.middlewares=immich-https-redirect
|
||||
- traefik.http.routers.immich-secure.entrypoints=websecure
|
||||
- traefik.http.routers.immich-secure.rule=Host(`${FQDN}`)
|
||||
- traefik.http.routers.immich-secure.tls=true
|
||||
- traefik.http.routers.immich-secure.tls.certresolver=letsencrypt
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
101
immich/docker-compose.yml
Normal file
101
immich/docker-compose.yml
Normal file
|
@ -0,0 +1,101 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
immich-server:
|
||||
image: altran1502/immich-server:release
|
||||
entrypoint: ["/bin/sh", "./start-server.sh"]
|
||||
volumes:
|
||||
- ./upload:/usr/src/app/upload
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
depends_on:
|
||||
- redis
|
||||
- database
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
||||
immich-microservices:
|
||||
image: altran1502/immich-server:release
|
||||
entrypoint: ["/bin/sh", "./start-microservices.sh"]
|
||||
volumes:
|
||||
- ./upload:/usr/src/app/upload
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
depends_on:
|
||||
- redis
|
||||
- database
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
||||
immich-machine-learning:
|
||||
image: altran1502/immich-machine-learning:release
|
||||
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
||||
volumes:
|
||||
- ./upload:/usr/src/app/upload
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
depends_on:
|
||||
- database
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
||||
immich-web:
|
||||
image: altran1502/immich-web:release
|
||||
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
||||
env_file:
|
||||
- .env
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
||||
redis:
|
||||
container_name: immich_redis
|
||||
image: redis:6.2
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
||||
database:
|
||||
container_name: immich_postgres
|
||||
image: postgres:14
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_USER: ${DB_USERNAME}
|
||||
POSTGRES_DB: ${DB_DATABASE_NAME}
|
||||
PG_DATA: /var/lib/postgresql/data
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
||||
immich-proxy:
|
||||
container_name: immich_proxy
|
||||
image: altran1502/immich-proxy:release
|
||||
logging:
|
||||
driver: none
|
||||
depends_on:
|
||||
- immich-server
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
networks:
|
||||
internal: {}
|
||||
proxy:
|
||||
external: true
|
68
immich/sample.env
Normal file
68
immich/sample.env
Normal file
|
@ -0,0 +1,68 @@
|
|||
###################################################################################
|
||||
# Url
|
||||
###################################################################################
|
||||
FQDN=immich.tuservidor.es
|
||||
|
||||
###################################################################################
|
||||
# Database
|
||||
###################################################################################
|
||||
|
||||
DB_HOSTNAME=immich_postgres
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=postgres
|
||||
DB_DATABASE_NAME=immich
|
||||
|
||||
# Optional Database settings:
|
||||
# DB_PORT=5432
|
||||
|
||||
###################################################################################
|
||||
# Redis
|
||||
###################################################################################
|
||||
|
||||
REDIS_HOSTNAME=immich_redis
|
||||
|
||||
# Optional Redis settings:
|
||||
# REDIS_PORT=6379
|
||||
# REDIS_DBINDEX=0
|
||||
# REDIS_PASSWORD=
|
||||
# REDIS_SOCKET=
|
||||
|
||||
###################################################################################
|
||||
# Log message level - [simple|verbose]
|
||||
###################################################################################
|
||||
|
||||
LOG_LEVEL=simple
|
||||
|
||||
###################################################################################
|
||||
# JWT SECRET
|
||||
###################################################################################
|
||||
|
||||
# This JWT_SECRET is used to sign the authentication keys for user login
|
||||
# You should set it to a long randomly generated value
|
||||
# You can use this command to generate one: openssl rand -base64 128
|
||||
JWT_SECRET=mXSsFf7gl/g1uw8ZMn9EoN2J2TxfAeGtWUu5RBwtmvPtlln17VQw9/XxVhjsAuDp9Rk1r/i4xHf3BQM8PeCpnCD8/8L0MUzxRK0+OqiurRDXxW7dQWJIZyo9TZkGOE5kX+H/TMDOiHwEEICVdCj4lf+Vm8ADLCAjtshaKq+exng=
|
||||
|
||||
###################################################################################
|
||||
# Reverse Geocoding
|
||||
####################################################################################
|
||||
|
||||
# DISABLE_REVERSE_GEOCODING=false
|
||||
|
||||
# Reverse geocoding is done locally which has a small impact on memory usage
|
||||
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
|
||||
# This ranges from 0-3 with 3 being the most precise
|
||||
# 3 - Cities > 500 population: ~200MB RAM
|
||||
# 2 - Cities > 1000 population: ~150MB RAM
|
||||
# 1 - Cities > 5000 population: ~80MB RAM
|
||||
# 0 - Cities > 15000 population: ~40MB RAM
|
||||
|
||||
# REVERSE_GEOCODING_PRECISION=3
|
||||
|
||||
####################################################################################
|
||||
# WEB - Optional
|
||||
####################################################################################
|
||||
|
||||
# Custom message on the login page, should be written in HTML form.
|
||||
# For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"
|
||||
|
||||
PUBLIC_LOGIN_PAGE_MESSAGE=
|
Loading…
Reference in New Issue
Block a user