Skip to content

Instantly share code, notes, and snippets.

@keriati
Created March 26, 2025 19:55
Show Gist options
  • Save keriati/c8297f0eb5d44f51f29b64bd20c28478 to your computer and use it in GitHub Desktop.
Save keriati/c8297f0eb5d44f51f29b64bd20c28478 to your computer and use it in GitHub Desktop.
Better Atuin Docker Compose file
services:
atuin:
image: ghcr.io/atuinsh/atuin:e8df3d1
command: server start
container_name: atuin
restart: unless-stopped
cpus: '1.0'
mem_limit: 512m
networks:
- proxy
volumes:
- "${DIR_APP}/config:/config"
environment:
ATUIN_HOST: "0.0.0.0"
ATUIN_OPEN_REGISTRATION: "true"
ATUIN_DB_URI: postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@atuin-db/$POSTGRES_DB
RUST_LOG: info,atuin_server=debug
depends_on:
postgresql:
condition: service_healthy
labels:
- "traefik.enable=true"
- "traefik.http.routers.${CONTAINER_NAME}-secure.entrypoints=https"
- "traefik.http.routers.${CONTAINER_NAME}-secure.rule=Host(`${SUB_DOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.${CONTAINER_NAME}-secure.tls=true"
- "traefik.http.routers.${CONTAINER_NAME}-secure.service=${CONTAINER_NAME}"
- "traefik.http.services.${CONTAINER_NAME}.loadbalancer.server.port=${SERVICE_PORT}"
- "traefik.docker.network=proxy"
postgresql:
image: postgres:14
container_name: atuin-db
cpus: '1.0'
mem_limit: 512m
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
restart: unless-stopped
networks:
- proxy
volumes:
- "${DIR_APP}/database:/var/lib/postgresql/data/"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
networks:
proxy:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment