Deploy atuin

This commit is contained in:
Jake Howard 2025-06-30 13:57:46 +01:00
parent f6649c8559
commit 03296b6286
No known key found for this signature in database
GPG key ID: 57AFB45680EDD477
5 changed files with 65 additions and 0 deletions

View file

@ -79,6 +79,7 @@
- bsky
- immich
- freshrss
- atuin
- hosts: ingress
roles:

View file

@ -0,0 +1,34 @@
services:
atuin:
image: ghcr.io/atuinsh/atuin:latest
restart: unless-stopped
command: server start
environment:
- TZ={{ timezone }}
- ATUIN_DB_URI=postgres://atuin:atuin@db/atuin
- ATUIN_HOST=0.0.0.0
- RUST_LOG=info
- ATUIN_OPEN_REGISTRATION=false
labels:
- traefik.enable=true
- traefik.http.routers.atuin.rule=Host(`atuin.jakehoward.tech`)
- traefik.http.services.atuin-atuin.loadbalancer.server.port=8888
- traefik.http.routers.atuin.middlewares=tailscale-only@file
depends_on:
- db
networks:
- default
- traefik
db:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- /mnt/speed/dbs/postgres/atuin:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=atuin
- POSTGRES_USER=atuin
networks:
traefik:
external: true

View file

@ -0,0 +1,4 @@
- name: restart atuin
shell:
chdir: /opt/atuin
cmd: "{{ docker_update_command }}"

View file

@ -0,0 +1,16 @@
- name: Create install directory
file:
path: /opt/atuin
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
- name: Install compose file
template:
src: files/docker-compose.yml
dest: /opt/atuin/docker-compose.yml
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: docker-compose -f %s config
notify: restart atuin

View file

@ -353,6 +353,16 @@ resource "gandi_livedns_record" "jakehowardtech_freshrss" {
]
}
resource "gandi_livedns_record" "jakehowardtech_atuin" {
zone = data.gandi_livedns_domain.jakehowardtech.id
name = "atuin"
type = "CNAME"
ttl = 3600
values = [
"${gandi_livedns_record.sys_domain_pve_private.name}.${gandi_livedns_record.sys_domain_pve_private.zone}."
]
}
resource "gandi_livedns_record" "jakehowardtech_caa" {
zone = data.gandi_livedns_domain.jakehowardtech.id
name = "@"