| 
									
										
										
										
											2023-06-10 15:29:03 +00:00
										 |  |  | version: "3.7"
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  | services:
 | 
					
						
							|  |  |  |   librephotos:
 | 
					
						
							| 
									
										
										
										
											2023-12-01 18:24:52 +00:00
										 |  |  |     image: reallibrephotos/librephotos-proxy:2023w48
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |     container_name: librephotos
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/scan:/data
 | 
					
						
							| 
									
										
										
										
											2022-10-12 19:26:47 +00:00
										 |  |  |       - ${APP_DATA_DIR}/data/protected_media:/protected_media
 | 
					
						
							| 
									
										
										
										
											2022-09-30 09:55:35 +00:00
										 |  |  |       - ${APP_DATA_DIR}/data/proxy/nginx.conf:/etc/nginx/nginx.conf:ro
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |     ports:
 | 
					
						
							|  |  |  |       - ${APP_PORT}:80
 | 
					
						
							|  |  |  |     depends_on:
 | 
					
						
							|  |  |  |       - librephotos-backend
 | 
					
						
							|  |  |  |       - librephotos-frontend
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							| 
									
										
										
										
											2022-11-11 19:33:58 +00:00
										 |  |  |     labels:
 | 
					
						
							| 
									
										
										
										
											2023-06-10 15:29:03 +00:00
										 |  |  |       # Main
 | 
					
						
							|  |  |  |       traefik.enable: true
 | 
					
						
							|  |  |  |       traefik.http.middlewares.librephotos-web-redirect.redirectscheme.scheme: https
 | 
					
						
							|  |  |  |       traefik.http.services.librephotos.loadbalancer.server.port: 80
 | 
					
						
							|  |  |  |       # Web
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-insecure.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-insecure.service: librephotos
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-insecure.middlewares: librephotos-web-redirect
 | 
					
						
							|  |  |  |       # Websecure
 | 
					
						
							| 
									
										
										
										
											2022-11-11 19:33:58 +00:00
										 |  |  |       traefik.http.routers.librephotos.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos.service: librephotos
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos.tls.certresolver: myresolver
 | 
					
						
							| 
									
										
										
										
											2023-06-10 15:29:03 +00:00
										 |  |  |       # Local domain
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local-insecure.rule: Host(`librephotos.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local-insecure.service: librephotos
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local-insecure.middlewares: librephotos-web-redirect
 | 
					
						
							|  |  |  |       # Local domain secure
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local.rule: Host(`librephotos.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local.service: librephotos
 | 
					
						
							|  |  |  |       traefik.http.routers.librephotos-local.tls: true
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   librephotos-db:
 | 
					
						
							| 
									
										
										
										
											2022-10-12 19:26:47 +00:00
										 |  |  |     image: postgres:14
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |     container_name: librephotos-db
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							| 
									
										
										
										
											2022-10-12 19:26:47 +00:00
										 |  |  |       POSTGRES_PASSWORD: ${LIBREPHOTOS_DB_PASSWORD}
 | 
					
						
							|  |  |  |       POSTGRES_USER: tipi
 | 
					
						
							|  |  |  |       POSTGRES_DB: librephotos
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/db:/var/lib/postgresql/data
 | 
					
						
							|  |  |  |     #Checking health of Postgres db
 | 
					
						
							|  |  |  |     healthcheck:
 | 
					
						
							| 
									
										
										
										
											2023-06-10 15:29:03 +00:00
										 |  |  |       test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |       interval: 5s
 | 
					
						
							|  |  |  |       timeout: 5s
 | 
					
						
							|  |  |  |       retries: 5
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							| 
									
										
										
										
											2023-03-28 21:42:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |   librephotos-frontend:
 | 
					
						
							| 
									
										
										
										
											2023-12-01 16:43:12 +00:00
										 |  |  |     image: reallibrephotos/librephotos-frontend:2023w48
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |     container_name: librephotos-frontend
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     depends_on:
 | 
					
						
							|  |  |  |       - librephotos-backend
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   librephotos-backend:
 | 
					
						
							| 
									
										
										
										
											2023-12-01 16:43:03 +00:00
										 |  |  |     image: reallibrephotos/librephotos:2023w48
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |     container_name: librephotos-backend
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/scan:/data
 | 
					
						
							| 
									
										
										
										
											2022-10-12 19:26:47 +00:00
										 |  |  |       - ${APP_DATA_DIR}/data/protected_media:/protected_media
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |       - ${APP_DATA_DIR}/data/logs:/logs
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/cache:/root/.cache
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       - SECRET_KEY=${LIBREPHOTOS_SECRET_KEY}
 | 
					
						
							| 
									
										
										
										
											2022-09-30 09:55:35 +00:00
										 |  |  |       - BACKEND_HOST=librephotos-backend
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |       - ADMIN_EMAIL=${LIBREPHOTOS_EMAIL}
 | 
					
						
							|  |  |  |       - ADMIN_USERNAME=${LIBREPHOTOS_USERNAME}
 | 
					
						
							|  |  |  |       - ADMIN_PASSWORD=${LIBREPHOTOS_PASSWORD}
 | 
					
						
							|  |  |  |       - DB_BACKEND=postgresql
 | 
					
						
							|  |  |  |       - DB_NAME=librephotos
 | 
					
						
							|  |  |  |       - DB_USER=tipi
 | 
					
						
							|  |  |  |       - DB_PASS=${LIBREPHOTOS_DB_PASSWORD}
 | 
					
						
							| 
									
										
										
										
											2022-10-12 19:26:47 +00:00
										 |  |  |       - DB_HOST=librephotos-db
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |       - DB_PORT=5432
 | 
					
						
							|  |  |  |       - REDIS_HOST=librephotos-redis
 | 
					
						
							|  |  |  |       - REDIS_PORT=6379
 | 
					
						
							|  |  |  |       - ALLOW_UPLOAD=true
 | 
					
						
							|  |  |  |       - DEBUG=0
 | 
					
						
							| 
									
										
										
										
											2023-05-05 19:24:34 +00:00
										 |  |  |       - CSRF_TRUSTED_ORIGINS=${APP_PROTOCOL:-http}://${APP_DOMAIN},http://${INTERNAL_IP}:${APP_PORT}
 | 
					
						
							| 
									
										
										
										
											2022-09-29 21:38:49 +00:00
										 |  |  |     # Wait for Postgres
 | 
					
						
							|  |  |  |     depends_on:
 | 
					
						
							|  |  |  |       librephotos-db:
 | 
					
						
							|  |  |  |         condition: service_healthy
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   librephotos-redis:
 | 
					
						
							|  |  |  |     image: redis:6
 | 
					
						
							|  |  |  |     container_name: librephotos-redis
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2023-03-28 21:42:26 +00:00
										 |  |  |       - tipi_main_network
 |