atuin-server: add config
This commit is contained in:
parent
b7d3ed7f18
commit
fe35e4baf1
12 changed files with 157 additions and 0 deletions
5
roles/atuin-server/files/atuin-server.postgres.backup.sh
Normal file
5
roles/atuin-server/files/atuin-server.postgres.backup.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
cd /etc/atuin
|
||||
|
||||
/usr/bin/docker compose exec -T db pg_dump -U atuin atuin |
|
||||
/usr/bin/gzip --rsyncable |
|
||||
/usr/local/bin/restic backup --stdin --stdin-filename atuin-server-postgres.sql.gz
|
||||
15
roles/atuin-server/files/atuin-server.service
Normal file
15
roles/atuin-server/files/atuin-server.service
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Sync server for Atuin
|
||||
After=docker.target
|
||||
Requires=docker.target
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
User=atuin
|
||||
Group=atuin
|
||||
WorkingDirectory=/etc/atuin
|
||||
ExecStart=/usr/bin/docker compose up
|
||||
ExecStop=/usr/bin/docker compose down
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
33
roles/atuin-server/files/compose.yml
Normal file
33
roles/atuin-server/files/compose.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# vim: ft=yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: 'ghcr.io/atuinsh/atuin:18.3.0'
|
||||
command: 'server start'
|
||||
restart: 'always'
|
||||
|
||||
ports:
|
||||
- '8009:8888'
|
||||
volumes:
|
||||
- '/etc/atuin/server.toml:/config/server.toml'
|
||||
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
db:
|
||||
image: 'postgres:16.4-alpine'
|
||||
restart: 'always'
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "atuin"]
|
||||
interval: 10s
|
||||
start_period: 30s
|
||||
|
||||
environment:
|
||||
- POSTGRES_USER=atuin
|
||||
- POSTGRES_PASSWORD=atuin
|
||||
- POSTGRES_DB=atuin
|
||||
volumes:
|
||||
- 'mnt/data1/atuin-server/postgres:/var/lib/postgresql/data'
|
||||
4
roles/atuin-server/files/server.toml
Normal file
4
roles/atuin-server/files/server.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
host = "0.0.0.0"
|
||||
port = 8888
|
||||
open_registration = true
|
||||
db_uri = "postgres://atuin:atuin@db/atuin"
|
||||
Loading…
Add table
Add a link
Reference in a new issue