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

Test branch #1586

Closed
wants to merge 10 commits into from
Closed
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
24 changes: 24 additions & 0 deletions .github/workflows/sync-nodejs-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Sync Node.js versions
on:
pull_request:
paths:
- 'Dockerfile'
jobs:
sync-node-version:
runs-on: ubuntu-latest
# if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update .nvmrc
run: |
grep -o -P '(?<=FROM node:)\d+.?\d*.?\d*' Dockerfile > .nvmrc
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .nvmrc
git commit -m "chore: sync .nvmrc with Dockerfile node version" || exit 1
git push
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.11.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
########################################################################################################################
########################################################################################################################

FROM node:23.1.0 AS updated-local
FROM node:24.1.0 AS updated-local

ENV TZ=Europe/Amsterdam
ENV CI=true
Expand Down
13 changes: 11 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@ is a portal for official communication with the municipality of Amsterdam. The a

To see the application quickly running locally, clone the repo and cd into the project folder. Inside the project folder create a new file called `.env.local`. Put the keys from `.env.local.template` inside the file AND ask one of the developers for possible additional values.

## Running localy
## Set-up

Put the following commands in your terminal:
We use Node, and to install the latest version, follow the instructions in this [Link](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating).<br>
Then execute the following commands in a bash terminal to install it and the rest of our dependencies:

```bash
cp -i .env.local.template .env.local
nvm install
npm install -g ts-node nodemon
npm install
```

## Running locally

Put the following commands in your terminal after all dependencies are installed:

```bash
npm run serve-dev
npm start
```
Expand Down
8 changes: 6 additions & 2 deletions src/server/routing/router-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
QueryParamsMaintenanceNotifications,
fetchMaintenanceNotificationsActual,
} from '../services/cms-maintenance-notifications';
import { getFromEnv } from '../helpers/env';

export const router = express.Router();

Expand Down Expand Up @@ -200,14 +201,17 @@ export async function zaakStatusHandler(
return res.redirect(loginRouteWithReturnTo);
}

const gitSHA = getFromEnv('MA_GIT_SHA', false) ?? -1;

router.get(
[BffEndpoints.ROOT, BffEndpoints.STATUS_HEALTH],
(req: Request, res: Response, next: NextFunction) => {
(_req: Request, res: Response) => {
return res.json({
status: 'OK',
otapEnv: OTAP_ENV,
release: RELEASE_VERSION,
gitSha: process.env.MA_GIT_SHA ?? '-1',
gitSha: gitSHA,
gitShaUrl: `https://github.com/Amsterdam/mijn-amsterdam-frontend/commit/${gitSHA}`,
buildId: process.env.MA_BUILD_ID ?? '-1',
});
}
Expand Down
Loading