upgrade
This commit is contained in:
parent
32a9121871
commit
82350d174f
5 changed files with 10 additions and 8 deletions
|
@ -6,7 +6,6 @@ from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Self
|
from typing import Self
|
||||||
|
|
||||||
from python_on_whales import docker
|
|
||||||
from python_on_whales import DockerClient
|
from python_on_whales import DockerClient
|
||||||
|
|
||||||
PROJECT_ROOT_DIRECTORY = Path(__file__).parent.parent.resolve()
|
PROJECT_ROOT_DIRECTORY = Path(__file__).parent.parent.resolve()
|
||||||
|
@ -75,8 +74,8 @@ class ServicesConfig:
|
||||||
return cls(servers=servers)
|
return cls(servers=servers)
|
||||||
|
|
||||||
|
|
||||||
def _get_service_context(service_name: str, config: ServicesConfig) -> str:
|
def _get_service_context(service_name: str, config: ServicesConfig, docker_client: DockerClient) -> str:
|
||||||
context_names = [ctx.name for ctx in docker.context.list()]
|
context_names = [ctx.name for ctx in docker_client.context.list()]
|
||||||
server_config = config.search_service(service_name)
|
server_config = config.search_service(service_name)
|
||||||
|
|
||||||
if server_config.context not in context_names:
|
if server_config.context not in context_names:
|
||||||
|
@ -86,7 +85,8 @@ def _get_service_context(service_name: str, config: ServicesConfig) -> str:
|
||||||
|
|
||||||
|
|
||||||
def deploy_service(service_name: str, config: ServicesConfig):
|
def deploy_service(service_name: str, config: ServicesConfig):
|
||||||
context = _get_service_context(service_name, config)
|
_tmp_client = DockerClient()
|
||||||
|
context = _get_service_context(service_name, config, _tmp_client)
|
||||||
service_dir = SERVICES_DIRECTORY / service_name
|
service_dir = SERVICES_DIRECTORY / service_name
|
||||||
|
|
||||||
docker = DockerClient(context=context)
|
docker = DockerClient(context=context)
|
||||||
|
|
|
@ -16,7 +16,7 @@ volumes:
|
||||||
name: authentik-certs
|
name: authentik-certs
|
||||||
|
|
||||||
x-authentik: &x-authentik
|
x-authentik: &x-authentik
|
||||||
image: ghcr.io/goauthentik/server:2024.6.3
|
image: ghcr.io/goauthentik/server:2024.8
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
|
@ -9,4 +9,4 @@ DB_DATABASE_NAME=immich
|
||||||
REDIS_HOSTNAME=redis
|
REDIS_HOSTNAME=redis
|
||||||
EXTERNAL_HOST=immich.togetherdays.cz
|
EXTERNAL_HOST=immich.togetherdays.cz
|
||||||
|
|
||||||
IMMICH_VERSION=v1.113.0
|
IMMICH_VERSION=v1.116.0
|
||||||
|
|
|
@ -30,7 +30,7 @@ services:
|
||||||
POSTGRES_PASSWORD: ${PAPERLESS_DBPASS}
|
POSTGRES_PASSWORD: ${PAPERLESS_DBPASS}
|
||||||
|
|
||||||
paperless:
|
paperless:
|
||||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
image: ghcr.io/paperless-ngx/paperless-ngx:2.12
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
networks:
|
networks:
|
||||||
traefik-net:
|
traefik-net:
|
||||||
|
driver: overlay
|
||||||
name: traefik-net
|
name: traefik-net
|
||||||
|
attachable: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
traefik-certs:
|
traefik-certs:
|
||||||
|
@ -34,7 +36,7 @@ services:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- traefik-certs:/letsencrypt
|
- traefik-certs:/letsencrypt
|
||||||
networks:
|
networks:
|
||||||
traefik-net:
|
- traefik-net
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
|
|
Loading…
Reference in a new issue