@@ -46,32 +46,6 @@ Our main website is https://polykey.io
46
46
npm install --save polykey
47
47
```
48
48
49
- ### Nix/NixOS
50
-
51
- Building the releases:
52
-
53
- ``` sh
54
- nix-build ./release.nix --attr application
55
- nix-build ./release.nix --attr docker
56
- nix-build ./release.nix --attr package.linux.x64.elf
57
- nix-build ./release.nix --attr package.windows.x64.exe
58
- nix-build ./release.nix --attr package.macos.x64.macho
59
- ```
60
-
61
- Install into Nix user profile:
62
-
63
- ``` sh
64
- nix-env -f ./release.nix --install --attr application
65
- ```
66
-
67
- ### Docker
68
-
69
- Install into Docker:
70
-
71
- ``` sh
72
- docker load --input " $( nix-build ./release.nix --attr docker) "
73
- ```
74
-
75
49
## Development
76
50
77
51
Run ` nix-shell ` , and once you're inside, you can use:
@@ -91,14 +65,6 @@ npm run lint
91
65
npm run lintfix
92
66
```
93
67
94
- ### Generating GRPC Stubs
95
-
96
- Once you update the ` src/proto/schemas ` files, run this to update the ` src/proto/js ` files.
97
-
98
- ``` sh
99
- npm run proto-generate
100
- ```
101
-
102
68
### Calling Commands
103
69
104
70
When calling commands in development, use this style:
@@ -127,65 +93,3 @@ npm publish --access public
127
93
git push
128
94
git push --tags
129
95
```
130
-
131
- ### Packaging Cross-Platform Executables
132
-
133
- We use ` pkg ` to package the source code into executables.
134
-
135
- This requires a specific version of ` pkg ` and also ` node-gyp-build ` .
136
-
137
- Configuration for ` pkg ` is done in:
138
-
139
- * ` package.json ` - Pins ` pkg ` and ` node-gyp-build ` , and configures assets and scripts.
140
- * ` utils.nix ` - Pins ` pkg ` for Nix usage
141
- * ` release.nix ` - Build expressions for executables
142
-
143
- ## Deployment
144
-
145
- Image deployments are done automatically through the CI/CD. However manual scripts are available below for deployment.
146
-
147
- ### Deploying to AWS ECR:
148
-
149
- #### Using skopeo
150
-
151
- ``` sh
152
- tag=' manual'
153
- registry_image=' 015248367786.dkr.ecr.ap-southeast-2.amazonaws.com/polykey'
154
-
155
- # Authenticates skopeo
156
- aws ecr get-login-password \
157
- | skopeo login \
158
- --username AWS \
159
- --password-stdin \
160
- " $registry_image "
161
-
162
- build=" $( nix-build ./release.nix --attr docker) "
163
- # This will push both the default image tag and the latest tag
164
- ./scripts/deploy-image.sh " $build " " $tag " " $registry_image "
165
- ```
166
-
167
- #### Using docker
168
-
169
- ``` sh
170
- tag=' manual'
171
- registry_image=' 015248367786.dkr.ecr.ap-southeast-2.amazonaws.com/polykey'
172
-
173
- aws ecr get-login-password \
174
- | docker login \
175
- --username AWS \
176
- --password-stdin \
177
- " $registry_image "
178
-
179
- build=" $( nix-build ./release.nix --attr docker) "
180
- loaded=" $( docker load --input " $build " ) "
181
- image_name=" $( cut -d' :' -f2 <<< " $loaded" | tr -d ' ' ) "
182
- default_tag=" $( cut -d' :' -f3 <<< " $loaded" ) "
183
-
184
- docker tag " ${image_name} :${default_tag} " " ${registry_image} :${default_tag} "
185
- docker tag " ${image_name} :${default_tag} " " ${registry_image} :${tag} "
186
- docker tag " ${image_name} :${default_tag} " " ${registry_image} :latest"
187
-
188
- docker push " ${registry_image} :${default_tag} "
189
- docker push " ${registry_image} :${tag} "
190
- docker push " ${registry_image} :latest"
191
- ```
0 commit comments