Storage Drivers

S3 / MinIO

This storage driver stores the cache in a S3 compatible storage, e.g. AWS S3 or MinIO.

Driver: s3

This storage driver stores the cache in a S3 compatible storage, e.g. AWS S3 or MinIO.

Configuration

docker-compose MinIO example

docker-compose.yml
version: '3.9'

services:
  cache-server:
    image: ghcr.io/falcondev-oss/github-actions-cache-server:latest
    ports:
      - '3000:3000'
    environment:
      URL_ACCESS_TOKEN: random_token
      API_BASE_URL: http://localhost:3000

      STORAGE_DRIVER: s3
      STORAGE_S3_BUCKET: gh-actions-cache
      STORAGE_S3_ACCESS_KEY: access_key
      STORAGE_S3_SECRET_KEY: secret_key

      STORAGE_S3_ENDPOINT: minio
      STORAGE_S3_PORT: '9000'
      STORAGE_S3_USE_SSL: 'false'
    volumes:
      - cache-data:/app/.data

  minio:
    image: quay.io/minio/minio
    ports:
      - '9000:9000'
    environment:
      MINIO_ROOT_USER: access_key
      MINIO_ROOT_PASSWORD: secret_key

volumes:
  cache-data:

docker-compose AWS S3 example

docker-compose.yml
version: '3.9'

services:
  cache-server:
    image: ghcr.io/falcondev-oss/github-actions-cache-server:latest
    ports:
      - '3000:3000'
    environment:
      URL_ACCESS_TOKEN: random_token
      API_BASE_URL: http://localhost:3000

      STORAGE_DRIVER: s3
      STORAGE_S3_BUCKET: gh-actions-cache
      STORAGE_S3_ACCESS_KEY: access_key
      STORAGE_S3_SECRET_KEY: secret_key

      STORAGE_S3_ENDPOINT: s3.amazonaws.com
      STORAGE_S3_PORT: '443'
      STORAGE_S3_USE_SSL: 'true'
    volumes:
      - cache-data:/app/.data

volumes:
  cache-data:

Environment Variables

Don't forget to set the STORAGE_DRIVER environment variable to s3 to use the S3 storage driver.

STORAGE_S3_BUCKET

Example: gh-actions-cache

The name of the S3 bucket used for storage.

STORAGE_S3_ACCESS_KEY

Example: access_key

The access key for S3 storage.

STORAGE_S3_SECRET_KEY

Example: secret_key

The secret key for S3 storage.

STORAGE_S3_ENDPOINT

Example: s3.amazonaws.com, minio

The endpoint hostname for S3 storage.

STORAGE_S3_REGION

Example: us-west-1

The region for AWS S3. Not needed with MinIO.

STORAGE_S3_PORT

Example: 443, 9000

The port S3 storage is running on.

STORAGE_S3_USE_SSL

Example: false

Whether to use SSL for S3 storage connections.


Copyright © 2024