services: pigallery2: image: bpatrik/pigallery2:latest container_name: pigallery2 deploy: resources: limits: memory: 2G # <1GB RAM might also work. It will trigger GC more often. GC is slow. See https://github.com/bpatrik/pigallery2/issues/1080 environment: - NODE_ENV=production # set to 'debug' for full debug logging # - NODE_OPTIONS=--enable-source-maps # enable source map support on the backend for development volumes: - "pig-cfg:/app/data/config" # CHANGE ME - "db-data:/app/data/db" - "${IMG_DIR:-}:/app/data/images:ro" # CHANGE ME, ':ro' means read-only # - "/var/tmp/pigallery2:/app/data/tmp" # CHANGE ME - type: tmpfs target: /app/data/tmp tmpfs: size: 512M mode: 1777 ports: - ${PIG_PORT:-80}:80 restart: always volumes: db-data: pig-cfg: