Skip to content

Commit 2427ed5

Browse files
authored
Merge pull request #1478 from ojeytonwilliams/docs/vm-startup
docs: add infra and provisioning docs
2 parents 86cdf86 + 3dca41c commit 2427ed5

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

docs/maintainers.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,37 @@ If any issue arises, run `heroku rollback` to rollback to the previous version o
8888

8989
If this is your first deploy, make sure another maintainer is around to assist.
9090

91+
## Infrastructure
92+
93+
The bundled documents are available at downloads.devdocs.io and the documents themselves at documents.devdocs.io. Download and document requests are proxied to S3 buckets devdocs-downloads.s3.amazonaws.com and devdocs-documents.s3.amazonaws.com respectively.
94+
95+
If there's ever a need to create a new proxy VM (and the `devdocs-proxy` snapshot is not available) then the new vm should be provisioned as follows:
96+
97+
```bash
98+
# we need at least nginx 1.19.x
99+
wget https://nginx.org/keys/nginx_signing.key
100+
apt-key add nginx_signing.key
101+
echo 'deb https://nginx.org/packages/mainline/ubuntu/ focal nginx' >> /etc/apt/sources.list
102+
echo 'deb-src https://nginx.org/packages/mainline/ubuntu/ focal nginx' >> /etc/apt/sources.list
103+
apt-get -y remove nginx-common
104+
apt-get -y update
105+
apt-get -y install nginx
106+
107+
# the config is on github
108+
rm -rf /etc/nginx/*
109+
rm -rf /etc/nginx/.* 2> /dev/null
110+
git clone https://github.com/freeCodeCamp/devdocs-nginx-config.git /etc/nginx
111+
112+
# at this point we need to add the certs from Cloudflare and test the config
113+
nginx -t
114+
115+
# if nginx is already running, just
116+
# ps aux | grep nginx
117+
# find the number and kill it
118+
119+
nginx
120+
```
121+
91122
## List of maintainers in alphabetical order
92123

93124
The following people (used to) maintain DevDocs:

0 commit comments

Comments
 (0)