Skip to content

szlepermarcin/s3-proxy-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

S3 proxy Resolver

a simple proxy resolver created with the intention of being used with scala-cli, which does not support custom resolver protocols

Note this proxy resolver does not allow publishing artifacts

usage

using scala-cli directly

scala-cli ProxyResolver.scala

with docker

scala-cli --power package --docker ProxyResolver.scala --docker-image-repository s3-proxy-resolver

docker run --rm -it -v /path/to/.s3credentials:/root/.s3credentials -p 8080:8080  s3-proxy-resolver

and then resolver can be added to your scala-cli script

//> using repository http://localhost:8080/some-bucket
//> using repository http://localhost:8080/some-other-bucket
//> using lib "org.example::lib-from-custom-resolver:0.0.1"

credentials

credentials can be provided as environment variables

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION (optional, default EU_CENTRAL_1)

or the script will look for files in the following locations:

  • current working directory
  • user home directory
  • .sbt directory in user home directory
  • .coursier directory in user home directory

the credential file name should be in one of two forms:

  • .s3credentials
  • .some-bucket-name_s3credentials

example credentials file content:

accessKey = XXXXXXX
secretKey = abcdefgh

# optional region
region = EU_CENTRAL_1

additional configuration

PROXY_SERVER_PORT (default 8080)

Releases

No releases published

Packages

No packages published

Languages