-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(readme): add section on making own formsg fork
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,47 @@ | |
Builds and publishes a Docker image to | ||
opengovsg/formsg-intl | ||
|
||
# Overview | ||
|
||
This repository consists of the following meaningful parts: | ||
|
||
### `replacements/` | ||
A minimal set of source files used to replace parts of the FormSG codebase, | ||
hiding or removing features specific to Singapore | ||
|
||
### `Dockerfile` | ||
A variation of the original `Dockerfile` in the FormSG codebase used | ||
to build production images. This variation deliberately installs | ||
[MockPass](https://github.com/opengovsg/mockpass) to add placeholder | ||
certificates. These certificates are usually used by FormSG to interact | ||
with Singpass and Corppass, and are hence required at runtime. | ||
|
||
### `.github/workflows/ci.yml` | ||
A GitHub Actions workflow to: | ||
- copy the original FormSG codebase | ||
- replace some of the source code using the files in `replacements/` | ||
- build a Docker image using `Dockerfile`, pushing the result to Docker Hub | ||
|
||
## Creating a fork of FormSG without Singapore-specific features | ||
- Fork the original codebase at [opengovsg/FormSG](https://github.com/opengovsg/FormSG) | ||
- Clone the resulting repository onto your local machine | ||
- While in the directory containing your repository, clone the formsg-intl repository | ||
into a subdirectory called `formsg-intl` | ||
``` | ||
git clone --depth 1 [email protected]:opengovsg/formsg-intl | ||
``` | ||
- Replace `Dockerfile`, and remove Singapore-specific features by replacing | ||
corresponding files with equivalents using the following command: | ||
``` | ||
cp -rf formsg-intl/replacements/* . | ||
cp -f formsg-intl/Dockerfile . | ||
``` | ||
- Once replacements are complete, remove the `formsg-intl/` directory with the command: | ||
``` | ||
rm -rf formsg-intl | ||
``` | ||
|
||
You now have a codebase of FormSG that has most of the Singapore-specific features hidden. | ||
note that the code implementing these features may still be present, so you are free to | ||
remove them, or study them to understand how you might build equivalent features in your | ||
local context. |