Skip to content

Commit

Permalink
docs(docs-infra): minor improvements in preview server docs (angular#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gkalpak authored and AndrewKushnir committed Sep 6, 2022
1 parent 28f277e commit 8fa33ed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ persistent disk can be used (as described [here](vm-setup--attach-persistent-dis
**Note:** The directories created inside that directory will be owned by user `www-data`.


## Create SSL certificates (Optional for dev)
The host VM can attach a directory containing the SSL certificate and key to be used by the nginx
## Create TLS certificates (Optional for dev)
The host VM can attach a directory containing the TLS certificate and key to be used by the nginx
server for serving the hosted previews. More info on how to attach the directory when
starting the container can be found [here](vm-setup--start-docker-container.md).

Expand All @@ -34,8 +34,9 @@ during development, but is not suitable for production.

**Note:**
Since nginx needs to be able to serve requests for both the main domain as well as any subdomain
(e.g. `ngbuilds.io/` and `foo-bar.ngbuilds.io/`), the provided certificate needs to be a wildcard
certificate covering both the domain and subdomains.
(e.g. `ngbuilds.io/` and `foo-bar.ngbuilds.io/`), the provided certificate needs to be a
[wildcard certificate](https://en.wikipedia.org/wiki/Wildcard_certificate) covering both the domain
and all subdomains.


## Create directory for logs (Optional)
Expand Down
21 changes: 16 additions & 5 deletions aio/aio-builds-setup/docs/vm-setup--start-docker-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,22 @@ sudo docker run \
# The directory the contains the secrets (e.g. GitHub token, JWT secret, etc).
# (See [here](vm-setup--set-up-secrets.md) for more info.)
#
# NOTE:
# Omitting this is OK during development/debugging, when you don't care to interact with real
# external services.
--volume <host-secrets-dir>:/aio-secrets:ro \
# The build artifacts and hosted previews will stored to and served from this directory.
# (If you are using a persistent disk - as described [here](vm-setup--attach-persistent-disk.md) -
# this will be a directory inside the disk.)
#
# NOTE:
# Omitting this is OK during development/debugging, when you don't care to interact with real
# external services.
--volume <host-builds-dir>:/var/www/aio-builds \
# The directory the contains the SSL certificates.
# The directory the contains the TLS certificates.
# (See [here](vm-setup--create-host-dirs-and-files.md) for more info.)
# If not provided, the container will use self-signed certificates.
[--volume <host-cert-dir>:/etc/ssl/localcerts:ro] \
Expand All @@ -77,10 +85,13 @@ sudo docker run \


## Example
The following command would start a docker container based on the previously created `foobar-builds`
docker image, alias it as 'foobar-builds-1' and map predefined directories on the host VM to be used
by the container for accessing secrets and SSL certificates and keeping the build artifacts and logs;
and will map the source scripts from the host to the container.
The following command would do the following:
1. Start a docker container based on the previously created `foobar-builds` docker image.
2. Alias the docker container as `foobar-builds-1` (so it can be references in subsequent docker
commands).
3. Map predefined directories on the host VM to be used by the container for accessing secrets and
TLS certificates and keeping the build artifacts and logs.
4. Map the source scripts from the host to the container (for debugging purposes).

```
sudo docker run \
Expand Down

0 comments on commit 8fa33ed

Please sign in to comment.