Skip to content

Commit d4ca38e

Browse files
committed
Updated documentation
1 parent 2515f82 commit d4ca38e

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,45 @@ Once you have started the proxy with valid AWS credentials (this uses the [defau
4848
2022/04/03 04:41:53 Requests will now be proxied to https://sktansandbox-1234567890.d.codeartifact.ap-southeast-2.amazonaws.com/pypi/sandbox/
4949
```
5050

51+
### Docker Examples
52+
53+
Docker CLI:
54+
55+
```
56+
docker run -v /root/.aws/:/.aws -e AWS_PROFILE=sktansandbox -e CODEARTIFACT_DOMAIN=sktansandbox -e CODEARTIFACT_REPO=sandbox -e CODEARTIFACT_TYPE=npm -p 8080:8080 sktan/aws-codeartifact-proxy
57+
```
58+
59+
Docker Compose:
60+
61+
```
62+
version: '3.1'
63+
64+
services:
65+
codeartifact-proxy:
66+
image: sktan/aws-codeartifact-proxy
67+
restart: always
68+
volumes:
69+
- /home/sktan/.aws/:/.aws
70+
environment:
71+
AWS_PROFILE: sktansandbox
72+
CODEARTIFACT_DOMAIN: sktansandbox
73+
CODEARTIFACT_REPO: sandbox
74+
CODEARTIFACT_OWNER: 1234567890
75+
CODEARTIFACT_TYPE: pypi
76+
ports:
77+
- 8080:8080
78+
```
79+
80+
### AWS Example
81+
82+
You will be able to use the CDK template in the `cdk` directory to create a Load Balancer, a fargate container and a CodeArtifact repository (if you desire).
83+
84+
```
85+
# Currently TODO
86+
```
87+
88+
## Testing Access
89+
5190
And to test that it is working, using `pip` against the proxy should result in similar output:
5291

5392
```
@@ -66,6 +105,19 @@ Successfully downloaded boto3
66105
2022/04/03 04:52:44 RES: 127.0.0.1:52066 "GET" 200 "/simple/boto3/" "pip/22.0.4 ...."
67106
```
68107

108+
NPM output:
109+
```
110+
root ➜ /tmp (master ✗) $ npm view --registry http://localhost:8080 axios dist.tarball
111+
http://localhost:8080/axios/-/axios-0.26.1.tgz
112+
113+
root ➜ /tmp (master ✗) $ npm install --registry http://localhost:8080 axios
114+
115+
added 2 packages in 2s
116+
117+
1 package is looking for funding
118+
run `npm fund` for details
119+
```
120+
69121
### IAM Permissions
70122

71123
Use the following permissions to grant the proxy ReadOnly access to the CodeArtifact repository.

0 commit comments

Comments
 (0)