Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Master] Release 1.78 #2288

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
41 changes: 41 additions & 0 deletions .ebextensions/25-load-sgid-env.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# loads SGID environment variables to a .env file from SSM

commands:
01-create-env:
command: "/tmp/create-env.sh"

files:
"/tmp/create-env.sh":
mode: "000755"
content : |
#!/bin/bash
ENV_NAME=$(/opt/elasticbeanstalk/bin/get-config environment -k SSM_PREFIX)

ENV_VARS=("SGID_CLIENT_ID" "SGID_CLIENT_SECRET" "SGID_PRIVATE_KEY")

echo "Set AWS region"
aws configure set default.region ap-southeast-1

TARGET_DIR=/etc/gogovsg

echo "Checking if ${TARGET_DIR} exists..."
if [ ! -d ${TARGET_DIR} ]; then
echo "Creating directory ${TARGET_DIR} ..."
mkdir -p ${TARGET_DIR}
if [ $? -ne 0 ]; then
echo 'ERROR: Directory creation failed!'
exit 1
fi
else
echo "Directory ${TARGET_DIR} already exists!"
fi

echo "Creating config for ${ENV_NAME} in ${AWS_REGION}"

for ENV_VAR in "${ENV_VARS[@]}"; do
echo "Running for this ${ENV_NAME}"
echo "Fetching ${ENV_VAR} from SSM"
VALUE=$(aws ssm get-parameter --name "${ENV_NAME}_${ENV_VAR}" --with-decryption --query "Parameter.Value" --output text)
echo "${ENV_VAR}=${VALUE}" >> $TARGET_DIR/.env
echo "Saved ${ENV_VAR}"
done
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,37 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.78.0](https://github.com/opengovsg/GoGovSG/compare/v1.77.2...v1.78.0)

- feat: remove verify message button linking to checkwho [`#2284`](https://github.com/opengovsg/GoGovSG/pull/2284)
- [develop] 1.77.2 [`#2279`](https://github.com/opengovsg/GoGovSG/pull/2279)

#### [v1.77.2](https://github.com/opengovsg/GoGovSG/compare/v1.77.1...v1.77.2)

> 2 October 2023

- [Snyk] Security upgrade sharp from 0.30.7 to 0.32.6 [`#2277`](https://github.com/opengovsg/GoGovSG/pull/2277)
- build(deps): bump import-in-the-middle from 1.4.1 to 1.4.2 [`#2259`](https://github.com/opengovsg/GoGovSG/pull/2259)
- [Develop] 1.77.1 [`#2267`](https://github.com/opengovsg/GoGovSG/pull/2267)

#### [v1.77.1](https://github.com/opengovsg/GoGovSG/compare/v1.77.0...v1.77.1)

> 7 September 2023

- fix: stored xss via file upload [`#2258`](https://github.com/opengovsg/GoGovSG/pull/2258)
- Develop 1.77.0 [`#2250`](https://github.com/opengovsg/GoGovSG/pull/2250)

#### [v1.77.0](https://github.com/opengovsg/GoGovSG/compare/v1.76.1...v1.77.0)

> 3 August 2023

- Experiment go <> sgid integration [`#2247`](https://github.com/opengovsg/GoGovSG/pull/2247)
- [develop] 1.76.1 [`#2241`](https://github.com/opengovsg/GoGovSG/pull/2241)

#### [v1.76.1](https://github.com/opengovsg/GoGovSG/compare/v1.76.0...v1.76.1)

> 13 July 2023

- build(deps): bump semver from 7.3.8 to 7.5.4 [`#2239`](https://github.com/opengovsg/GoGovSG/pull/2239)
- build(deps): bump react-vis from 1.11.7 to 1.11.8 [`#2238`](https://github.com/opengovsg/GoGovSG/pull/2238)
- build(deps): bump @sentry/cli from 1.67.2 to 1.75.2 [`#2231`](https://github.com/opengovsg/GoGovSG/pull/2231)
Expand Down
6 changes: 6 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
{
"ContainerPort": "8080"
}
],
"Volumes": [
{
"HostDirectory": "/etc/gogovsg/.env",
"ContainerDirectory": "/usr/src/gogovsg/.env"
}
]
}
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ services:
- REDIS_SAFE_BROWSING_URI=redis://redis:6379/4
- SESSION_SECRET=thiscouldbeanything
- GA_TRACKING_ID=UA-139330318-1
- SGID_API_HOSTNAME=https://api.id.gov.sg

- OG_URL=https://go.gov.sg
- VALID_EMAIL_GLOB_EXPRESSION=*.gov.sg
- COOKIE_MAX_AGE=86400000
Expand Down
Loading
Loading