few updates
This commit is contained in:
parent
c1400b8110
commit
3a79383d38
6 changed files with 48 additions and 8 deletions
|
@ -1,8 +1,9 @@
|
|||
from tasks.ssh import setup_ssh
|
||||
|
||||
from pyinfra.operations import apt
|
||||
from pyinfra_docker import deploy_docker
|
||||
|
||||
from tasks.ssh import setup_ssh
|
||||
from tasks.tailscale import deploy_tailscale
|
||||
|
||||
apt.packages(
|
||||
name="Update and upgrade server",
|
||||
update=True,
|
||||
|
@ -28,3 +29,5 @@ apt.packages(
|
|||
setup_ssh()
|
||||
|
||||
deploy_docker()
|
||||
|
||||
deploy_tailscale()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
servers = [
|
||||
(
|
||||
"kropcloud-vps0", {
|
||||
"vps0.katuwoss.dev", {
|
||||
"ssh_user": "root",
|
||||
"web_server": True,
|
||||
"services": [
|
||||
|
|
|
@ -6,4 +6,4 @@ DB_USERNAME=
|
|||
DB_DATABASE_NAME=
|
||||
|
||||
REDIS_HOSTNAME=
|
||||
HOST=
|
||||
EXTERNAL_HOST=
|
|
@ -16,7 +16,7 @@ x-traefik: &x-traefiK
|
|||
|
||||
services:
|
||||
immich-server:
|
||||
image: ghcr.io/immich-app/immich-server:release
|
||||
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
|
||||
command: [ 'start.sh', 'immich' ]
|
||||
volumes:
|
||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||
|
@ -31,13 +31,13 @@ services:
|
|||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik-net
|
||||
- traefik.http.routers.immich.rule=Host(`${HOST}`)
|
||||
- traefik.http.routers.immich.rule=Host(`${EXTERNAL_HOST}`)
|
||||
- traefik.http.routers.immich.entrypoints=${ENTRYPOINTS:-websecure}
|
||||
- traefik.http.routers.immich.tls.certresolver=le
|
||||
- traefik.http.services.immich.loadbalancer.server.port=3001
|
||||
|
||||
immich-microservices:
|
||||
image: ghcr.io/immich-app/immich-server:release
|
||||
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
|
||||
command: [ 'start.sh', 'microservices' ]
|
||||
volumes:
|
||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||
|
@ -49,7 +49,7 @@ services:
|
|||
- database
|
||||
|
||||
immich-machine-learning:
|
||||
image: ghcr.io/immich-app/immich-machine-learning:release
|
||||
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
|
||||
volumes:
|
||||
- model-cache-data:/cache
|
||||
env_file:
|
||||
|
|
|
@ -6,6 +6,8 @@ networks:
|
|||
volumes:
|
||||
joplin-pg-data:
|
||||
name: joplin-pg-data
|
||||
joplin-pg-backup:
|
||||
name: joplin-pg-backup
|
||||
|
||||
services:
|
||||
db:
|
||||
|
@ -53,3 +55,16 @@ services:
|
|||
- traefik.http.routers.joplin.entrypoints=websecure
|
||||
- traefik.http.routers.joplin.tls.certresolver=le
|
||||
- traefik.http.services.joplin.loadbalancer.server.port=22300
|
||||
|
||||
backup:
|
||||
image: prodrigestivill/postgres-backup-local:15
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- joplin-pg-backup:/backups
|
||||
environment:
|
||||
- POSTGRES_EXTRA_OPTS=-Z 6 -F c
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_DB=${POSTGRES_DATABASE}
|
||||
- POSTGRES_HOST=db
|
22
tasks/tailscale.py
Normal file
22
tasks/tailscale.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
from pyinfra.api import deploy
|
||||
from pyinfra.operations import server, apt
|
||||
|
||||
|
||||
@deploy
|
||||
def deploy_tailscale():
|
||||
server.shell(
|
||||
name="Install tailscale signing key",
|
||||
commands=["curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg "
|
||||
"| tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null 2>&1"]
|
||||
)
|
||||
apt.repo(
|
||||
name="Add tailscale repository",
|
||||
src="deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] "
|
||||
"https://pkgs.tailscale.com/stable/debian bookworm main",
|
||||
filename="tailscale"
|
||||
)
|
||||
apt.packages(
|
||||
name="Install tailscale",
|
||||
packages=["tailscale"],
|
||||
update=True
|
||||
)
|
Loading…
Reference in a new issue