Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
# shared-sites

Shared content across keyman.com sites
Shared content across keyman.com sites and centralized management of website
launch and configuration.

## Centralized management of keyman.com sites

The local build.sh script allows you to clone, build, start, stop, and test
all keyman.com sites with a single command.

The repositories are assumed to be in subfolders of the parent folder for
this repo, for example, the following folder layout is suggested:

```
/.../projects/keyman/
sites/
api.keyman.com/
keyman.com/
...
shared-sites/
website-local-proxy/
```

To see the full list of commands and repositories, run:

```sh
./build.sh --help
```

Some common commands are:

```sh
./build.sh clone # Clone websites from GitHub into subfolders of parent folder
./build.sh pull # Switch to master and pull latest changes to websites, DELETES MERGED BRANCHES
./build.sh configure # Configure websites
./build.sh clean # Clean websites
./build.sh build # Build docker images
./build.sh start # Start Docker containers
./build.sh stop # Stop Docker containers
./build.sh test # Test websites
```

These commands can be combined, e.g.

```sh
./build.sh configure,build,start,test
```

And can be limited to specific repos, e.g.:

```sh
./build.sh build,start:keyman.com,keymanweb.com
```

## Shared content

Expand Down Expand Up @@ -47,6 +97,12 @@ keyman.com sites. It rebuilds the `/_common/assets` folder and creates the

This script is not the same as the `build.sh` script on keyman.com sites.

The command to run is:

```sh
./build.sh build-files
```

## Distribution of changes

### Preparing changes
Expand Down
7 changes: 3 additions & 4 deletions sites.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Keyman is copyright (C) SIL Global. MIT License.

# Site repositories that run on Docker
sites=(api.keyman.com help.keyman.com keyman.com keymanweb.com s.keyman.com website-local-proxy)

repositories=( ${sites[@]/#/keymanapp/})
site_targets=( ${sites[@]/#/:})
export sites=(api.keyman.com help.keyman.com keyman.com keymanweb.com s.keyman.com website-local-proxy)
export repositories=("${sites[@]/#/keymanapp/}")
export site_targets=("${sites[@]/#/:}")