diff --git a/docker-compose.yml b/docker-compose.yml index aca1fc47c3..7739e36768 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -111,8 +111,8 @@ services: volumes: - ./local-config/:/app/ environment: - AWS_ACCESS_KEY_ID: "-" - AWS_SECRET_ACCESS_KEY: "-" + AWS_ACCESS_KEY_ID: "devkey" + AWS_SECRET_ACCESS_KEY: "devkey" AWS_ENDPOINT_DYNAMODB: dynamodb:8000 OPG_LPA_COMMON_SQS_ENDPOINT: localstack:4566 @@ -186,8 +186,8 @@ services: OPG_LPA_FRONT_CSRF_SALT: "test" # Local only - AWS_ACCESS_KEY_ID: "-" - AWS_SECRET_ACCESS_KEY: "-" + AWS_ACCESS_KEY_ID: "devkey" + AWS_SECRET_ACCESS_KEY: "devkey" OPG_LPA_COMMON_DYNAMODB_ENDPOINT: http://dynamodb:8000 @@ -305,8 +305,8 @@ services: OPG_LPA_COMMON_ADMIN_ACCOUNTS: "${OPG_LPA_COMMON_ADMIN_ACCOUNTS}" # Local only - AWS_ACCESS_KEY_ID: "-" - AWS_SECRET_ACCESS_KEY: "-" + AWS_ACCESS_KEY_ID: "devkey" + AWS_SECRET_ACCESS_KEY: "devkey" OPG_LPA_COMMON_DYNAMODB_ENDPOINT: http://dynamodb:8000 OPG_LPA_COMMON_S3_ENDPOINT: http://localstack:4566 @@ -381,8 +381,8 @@ services: OPG_LPA_ADMIN_JWT_SECRET: "test-secret" # Local only - AWS_ACCESS_KEY_ID: "-" - AWS_SECRET_ACCESS_KEY: "-" + AWS_ACCESS_KEY_ID: "devkey" + AWS_SECRET_ACCESS_KEY: "devkey" OPG_LPA_COMMON_DYNAMODB_ENDPOINT: http://dynamodb:8000 @@ -443,8 +443,8 @@ services: OPG_LPA_COMMON_PDF_CACHE_S3_BUCKET: "lpacache" # Local only - AWS_ACCESS_KEY_ID: "-" - AWS_SECRET_ACCESS_KEY: "-" + AWS_ACCESS_KEY_ID: "devkey" + AWS_SECRET_ACCESS_KEY: "devkey" OPG_LPA_COMMON_S3_ENDPOINT: http://localstack:4566 OPG_LPA_COMMON_PDF_QUEUE_URL: http://localstack:4566/000000000000/pdf-queue.fifo diff --git a/docs/runbooks/troubleshooting_container_images/troubleshooting_container_images.md b/docs/runbooks/troubleshooting_container_images/troubleshooting_container_images.md index d1336bfffe..1387786416 100644 --- a/docs/runbooks/troubleshooting_container_images/troubleshooting_container_images.md +++ b/docs/runbooks/troubleshooting_container_images/troubleshooting_container_images.md @@ -73,7 +73,7 @@ docker pull 311462405659.dkr.ecr.eu-west-1.amazonaws.com/online-lpa/api_app:late run the image up, enable xdebug on the container and run the tests, using the following commands: ``` bash -docker run -d --env AWS_ACCESS_KEY_ID='-' --env AWS_SECRET_ACCESS_KEY='-' --name api-tests 311462405659.dkr.ecr.eu-west-1.amazonaws.com/online-lpa/api_app:latest +docker run -d --env AWS_ACCESS_KEY_ID='devkey' --env AWS_SECRET_ACCESS_KEY='devkey' --name api-tests 311462405659.dkr.ecr.eu-west-1.amazonaws.com/online-lpa/api_app:latest docker exec api-tests docker-php-ext-enable xdebug docker exec api-tests /app/vendor/bin/phpunit -d memory_limit=256M @@ -88,11 +88,11 @@ docker exec api-tests /app/vendor/bin/phpunit -d memory_limit=256M 3. set image name (as in previous step) 4. set container name as set in previous step 5. you may need to set AWS environment variables - these should be all you need: - 1. `AWS_ACCESS_KEY_ID='-'; AWS_SECRET_ACCESS_KEY='-'` + 1. `AWS_ACCESS_KEY_ID='devkey'; AWS_SECRET_ACCESS_KEY='devkey'` 6. in the command preview you will see the constructed command look like this: ``` bash - docker run -P --env AWS_ACCESS_KEY_ID='-' --env AWS_SECRET_ACCESS_KEY='-' --name api-tests 311462405659.dkr.ecr.eu-west-1.amazonaws.com/online-lpa/api_app:latest + docker run -P --env AWS_ACCESS_KEY_ID='devkey' --env AWS_SECRET_ACCESS_KEY='devkey' --name api-tests 311462405659.dkr.ecr.eu-west-1.amazonaws.com/online-lpa/api_app:latest ``` ## Setting up debugging of PHPUnit tests in PHPStorm @@ -124,7 +124,7 @@ This consists of 3 main steps: 7. connect to a running instance of the image above to work this out. ``` bash - docker run -d --env AWS_ACCESS_KEY_ID='-' --env AWS_SECRET_ACCESS_KEY='-' --name api-tests 311462405659.dkr.ecr.eu-west-1.amazonaws.com/online-lpa/api_app:latest + docker run -d --env AWS_ACCESS_KEY_ID='devkey' --env AWS_SECRET_ACCESS_KEY='devkey' --name api-tests 311462405659.dkr.ecr.eu-west-1.amazonaws.com/online-lpa/api_app:latest docker exec -it api-tests sh ``` diff --git a/service-api/docker/app/Dockerfile b/service-api/docker/app/Dockerfile index bbe734ef8b..0d84e13bd5 100644 --- a/service-api/docker/app/Dockerfile +++ b/service-api/docker/app/Dockerfile @@ -1,11 +1,10 @@ -FROM php:8.2-fpm-alpine3.16 +FROM php:8.2-fpm-alpine3.17 ENV OPG_PHP_POOL_CHILDREN_MAX="25" RUN adduser -D -g '' appuser -RUN apk add --upgrade --no-cache apk-tools -RUN apk upgrade --no-cache +RUN apk add --no-cache apk-tools RUN apk add --no-cache postgresql-libs icu fcgi \ && apk add --update --no-cache --virtual .build-dependencies $PHPIZE_DEPS postgresql-dev icu-dev linux-headers \