Files
docker-compose-cookbooks/stashapp/README.md
T
2025-02-22 20:29:05 -08:00

2.0 KiB

Stash App Docker Compose Configuration

Overview

This Docker Compose configuration sets up the Stash application using Docker containers.

Setup

Data directories

By default the compose file creates volumes locally in the project:

mkdir -p data/video data/cache data/metadata data/generated data/root/.stash
touch data/root/.stash/config.yml

Usually I .gitignore the data directory and use a backup solution for redundancy.

Usage

In the project directory just run

# Docker Start
docker-compose up -d

# Docker Stop 
docker-compose down

# Podman Start
podman-compose up -d

# Podman Stop 
podman-compose down

Configuration Details

Environment Variables

STASH_IMAGE

Docker image tag for Stash app.

STASH_DOMAIN_NAME

Domain name for the Stash app.

MAX_SIZE

Maximum size for log files.

Other

STASH_STASH, STASH_GENERATED, STASH_METADATA, STASH_CACHE: Paths for Stash data directories.

Volumes

/etc/localtime:/etc/localtime:ro: Mounts host system's timezone information. ./data/video:/data: Maps local ./data/video directory to Stash /data directory. ./data/metadata:/metadata: Maps local ./data/metadata directory to Stash /metadata directory. ./data/cache:/cache: Maps local ./data/cache directory to Stash /cache directory. ./data/generated:/generated: Maps local ./data/generated directory to Stash /generated directory. ./data/root:/root: Maps local ./data/root directory to Stash /root directory.

Networking

In your project file, you can change the network mode to host:

stash:
    extends:
      file: ${COOKBOOK}/stashapp/docker-compose.yml
      service: stash
    env_file:
      - .env
    ports:
      - "8000:9999"
    network_mode: "host"

If you are using a reverse proxy, you need to set that network:

networks:
  proxy:
    external: true