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
      S3_BUCKET: gh-actions-cache
      S3_ACCESS_KEY: access_key
      S3_SECRET_KEY: secret_key

      S3_ENDPOINT: minio
      S3_PORT: '9000'
      S3_USE_SSL: 'false'
    volumes:
      - cache-data:/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
      S3_BUCKET: gh-actions-cache
      S3_ACCESS_KEY: access_key
      S3_SECRET_KEY: secret_key

      S3_ENDPOINT: s3.amazonaws.com
      S3_PORT: '443'
      S3_USE_SSL: 'true'
    volumes:
      - cache-data:/data

volumes:
  cache-data:

Environment Variables

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

S3_BUCKET

Example: gh-actions-cache

The name of the S3 bucket used for storage.

S3_ACCESS_KEY

Example: access_key

The access key for S3 storage.

S3_SECRET_KEY

Example: secret_key

The secret key for S3 storage.

S3_ENDPOINT

Example: s3.amazonaws.com, minio

The endpoint hostname for S3 storage.

S3_REGION

Example: us-west-1

The region for AWS S3. Not needed with MinIO.

S3_PORT

Example: 443, 9000

The port S3 storage is running on.

S3_USE_SSL

Example: false

Whether to use SSL for S3 storage connections.


Copyright © 2024