Self-hosted cache server for nrwl/nx
version: '3.5'
services:
nx-cache:
image: aaa4xu/nx-self-hosted-cache
environment:
MINIO_ADDRESS: http://accesskey:secretkey@host.docker.internal:9000 # "localhost" or "minio" is not valid address here!
ports:
- 8000:80
minio:
image: minio/minio:RELEASE.2020-08-08T04-50-06Z
environment:
MINIO_ACCESS_KEY: accesskey
MINIO_SECRET_KEY: secretkey
ports:
- 9000:9000
command: server /data
- Install and configure Minio
docker run -p 8000:80 \ -e "MINIO_ADDRESS=http://accesskey:secretkey@minio.domain.com:9000" \ aaa4xu/nx-self-hosted-cache
- Install and configure Minio
git clone https://github.com/aaa4xu/nx-self-hosted-cache.git
npm install
- Copy
default.env
to.env
- Set
MINIO_ADDRESS
in.env
yarn start
/npm start
- Setup your workspace with Nx Cloud guide.
- Open
nx.json
and createurl
option for@nrwl/nx-cloud
runner:{ "default": { "runner": "@nrwl/nx-cloud", "options": { "accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "cacheableOperations": [ "build", "test", "lint", "e2e" ], "canTrackAnalytics": false, "showUsageWarnings": true, "url": "http://localhost:8000" } } }
nx affected:build