Skip to content

Commit 5f8e748

Browse files
committed
docs(readme): describe how to run and use the proxy in dev environment
Add description on how to get a local proxy running for development purposes. Including on how to run it in a K8s cluster using DevSpace. Fixes #18
1 parent fee2dde commit 5f8e748

File tree

1 file changed

+44
-9
lines changed

1 file changed

+44
-9
lines changed

README.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
- [About](#about)
1818
- [Getting Started](#getting_started)
1919
- [Running the Tests](#tests)
20-
- [Deployment](#deployment)
2120
- [Usage](#usage)
21+
- [Deployment](#deployment)
2222
- [Contributors](#contributors)
2323

2424
## 🧐 About <a name = "about"></a>
@@ -41,7 +41,9 @@ First we need to install all dependencies, run:
4141
yarn install
4242
```
4343

44-
To start the development environment, run:
44+
### Running Locally
45+
46+
To start the development environment using either of the following commands:
4547

4648
```bash
4749
# Without file watching
@@ -51,27 +53,60 @@ yarn start
5153
yarn dev
5254
```
5355

54-
## 🔧 Running the Tests <a name = "tests"></a>
56+
### Running in Kubernetes using DevSpace
5557

56-
After setting up the development environment, tests can be invoked using:
58+
Build the application, the `--watch` flag is optional and enables automatic hotreloading:
5759

5860
```bash
59-
yarn test
61+
yarn build --watch
62+
```
63+
64+
Then to configure and launch [DevSpace](https://devspace.sh/) run:
65+
66+
```bash
67+
# Configure DevSpace to the desired namespace
68+
devspace use namespace container-registry-provider
69+
70+
# Deploy a development version onto K8s
71+
devspace dev
6072
```
6173

6274
## 🎈 Usage <a name="usage"></a>
6375

64-
Execute:
76+
Once you have a proxy running, you can use it like this:
6577

6678
```bash
67-
yarn build
79+
# For https://hub.docker.com/r/addono/container-registry-proxy
80+
docker pull localhost:8080/addono/container-registry-proxy
81+
82+
# For https://hub.docker.com/_/nginx
83+
docker pull localhost:8080/library/nginx
6884
```
6985

70-
Which builds the app for production to the `dist` folder.
86+
> Note: If your Docker daemon is running in a VM, which would be the case if you're using Docker Toolbox on Mac, then pulling directly from localhost will not work. One workaround is using ngrok to have a publicly available domain name to connect to:
87+
>
88+
> ```bash
89+
> # Note the ngrok domain assigned to you
90+
> ngrok http 8080
91+
>
92+
> # Make sure to replace the ngrok domain name
93+
> docker pull 5d354ae8.ngrok.io/library/nginx
94+
> ```
95+
96+
## 🔧 Running the Tests <a name = "tests"></a>
97+
98+
After setting up the development environment, tests can be invoked using:
99+
100+
```bash
101+
yarn test
102+
```
71103
72104
## 🚀 Deployment <a name = "deployment"></a>
73105

74-
We automatically build and deploy the latest version to NPM.
106+
We automatically build and deploy the latest version and all [releases](https://github.com/Addono/container-registry-proxy/releases) to:
107+
108+
- [NPM](https://www.npmjs.com/package/container-registry-proxy)
109+
- [Docker Hub](https://hub.docker.com/r/addono/container-registry-proxy)
75110

76111
## ✨ Contributors <a name = "contributors"></a>
77112

0 commit comments

Comments
 (0)