Skip to content

Commit bcd1283

Browse files
authoredApr 19, 2024
📝 RW-xx: Add infra docs (#107)
1 parent 7152925 commit bcd1283

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
 

‎README.md

+36
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,39 @@ Examples:
119119
- 🗑️ - removing stuff
120120

121121
Avoid commits in the form of `CR fixes`. Either make the messages meaningful or squash the commits before merging to keep the history clear.
122+
123+
# Infrastructure
124+
125+
The infrastructure is build on Digital Ocean using [k8s](https://kubernetes.io/docs/tasks/tools/) and [helm](https://helm.sh/docs/intro/install/). There is no build in secret manager in DO so at this stage of the project we keep the secrets locally in `helm/envs/dev/secrets.yaml` and `helm/envs/prod/secrets.yaml`. Before deployment you should create these files with appropriate values
126+
```yaml
127+
vars:
128+
SECRET_KEY: ...
129+
DATABASE_URL: ...
130+
SEI_ADMIN_MNEMONIC: ...
131+
AWS_ACCESS_KEY_ID: ...
132+
AWS_SECRET_ACCESS_KEY: ...
133+
NFT_STORAGE_API_KEY: ...
134+
SENDGRID_API_KEY: ...
135+
```
136+
137+
To connect to DO use [doctl](https://docs.digitalocean.com/reference/doctl/how-to/install/). Set up kubernetes config using
138+
```
139+
doctl kubernetes cluster kubeconfig save <use_your_cluster_name>
140+
```
141+
and login to DO registry with
142+
```
143+
doctl registry login
144+
```
145+
After doing the initial setup you can build all images locally using
146+
```
147+
make build
148+
```
149+
and then push the images to the registry and deploy with
150+
```
151+
make release
152+
```
153+
The default environment is `dev`. If you want to deploy a different environment for example `prod` you should set up k8s config for this env and in this context build and release with `ENV=prod`
154+
```
155+
make build ENV=prod
156+
make release ENV=prod
157+
```

0 commit comments

Comments
 (0)
Please sign in to comment.