Skip to content

Commit

Permalink
Merge pull request #300 from companieshouse/feature/CC-1162
Browse files Browse the repository at this point in the history
Node V20 Docker changes
  • Loading branch information
hselvakumar authored Feb 12, 2024
2 parents a8eaded + ebefb68 commit 9ba835d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
!package-lock.json
!package.json
!tsconfig.json
!node_modules
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM 416670754337.dkr.ecr.eu-west-2.amazonaws.com/ci-node-runtime-18
FROM 416670754337.dkr.ecr.eu-west-2.amazonaws.com/ci-node-runtime-20
WORKDIR /opt
COPY api-enumerations ./api-enumerations
COPY dist ./package.json ./package-lock.json docker_start.sh ./
COPY node_modules ./node_modules

CMD ["./docker_start.sh"]

Expand Down
4 changes: 2 additions & 2 deletions Tiltfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ local_resource(
custom_build(
ref = '416670754337.dkr.ecr.eu-west-2.amazonaws.com/strike-off-objections-web',
#the following build-command was updated as specified by https://github.com/companieshouse/docker-chs-development/pull/581
command = 'DOCKER_BUILDKIT=0 docker build --build-arg SSH_PRIVATE_KEY="$(ssh_key_path="$(ssh -G github.com | grep -e \'^identityfile.*\' | head -n1 | sed \'s|^identityfile \\(.*\\)|\\1|\')"; if [ -z "${ssh_key_path}" ]; then echo "Could not find ssh key path for github.com">&2; false; elif [ -f "${ssh_key_path}" ]; then cat "${ssh_key_path}"; else echo "Could not find ssh key for github at ${ssh_key_path}" >&2; false; fi)" --build-arg SSH_PRIVATE_KEY_PASSPHRASE --tag $EXPECTED_REF .',
command = 'docker build --build-arg SSH_PRIVATE_KEY="$(ssh_key_path="$(ssh -G github.com | grep -e \'^identityfile.*\' | head -n1 | sed \'s|^identityfile \\(.*\\)|\\1|\')"; if [ -z "${ssh_key_path}" ]; then echo "Could not find ssh key path for github.com">&2; false; elif [ -f "${ssh_key_path}" ]; then cat "${ssh_key_path}"; else echo "Could not find ssh key for github at ${ssh_key_path}" >&2; false; fi)" --build-arg SSH_PRIVATE_KEY_PASSPHRASE --tag $EXPECTED_REF .',
live_update = [
sync(
local_path = './src',
remote_path = '/app/src'
remote_path = '/opt/src'
),
restart_container()
],
Expand Down
1 change: 0 additions & 1 deletion docker_start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
#
# Start script for applications.developer.ch.gov.uk
npm i
PORT=3000

export NODE_PORT=${PORT}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0
2.1

0 comments on commit 9ba835d

Please sign in to comment.