Skip to content

Commit

Permalink
Merge branch 'dev' into usagov-2077-usps-api-error
Browse files Browse the repository at this point in the history
  • Loading branch information
developer43 authored Dec 13, 2024
2 parents 2fbce5d + 5fb416f commit c3e98ba
Show file tree
Hide file tree
Showing 114 changed files with 7,568 additions and 4,432 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ commands:
echo "git checkout << parameters.envname >>"
echo "git fetch --all --tags"
echo "git pull"
echo bin/deploy/git-annotated-tag-creator.sh << parameters.envname >> << pipeline.number >> $CMS_DIGEST $WAF_DIGEST
echo bin/deploy/git-annotated-tag-creator.sh << parameters.envname >> << pipeline.number >> $CMS_DIGEST $WAF_DIGEST $WWW_DIGEST
echo
fi
- run:
Expand Down Expand Up @@ -252,7 +252,7 @@ commands:
printenv | grep -i -v -E "^(PWD|OLDPWD|SHLVL|_)=" | sed -e 's/^\([^=]*=\)\(.*\)/export \1"\2"/' | tee /home/circleci/project/env.local
./bin/cloudgov/login $CF_SERVICE_USER $CF_SERVICE_PASS << parameters.envname >>
./bin/cloudgov/space << parameters.envname >>
./bin/cloudgov/deploy-cron << parameters.envname >> << pipeline.number >> $CMS_DIGEST
./bin/cloudgov/deploy-cron << parameters.envname >> << pipeline.number >> $CRON_DIGEST
jobs:
scan-code:
Expand Down Expand Up @@ -844,7 +844,6 @@ workflows:
- dev
- stage
- prod

- build-and-push-container-cron:
requires:
- approve-build-and-push-container-cron
Expand Down
100 changes: 50 additions & 50 deletions .docker/Dockerfile-cms
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ RUN npm install --production=false --prefix /var/www/web/themes/custom/usagov \
&& chown -R node:node /var/www/web/themes

###############################################################
FROM alpine:3.18 AS cms
FROM alpine:3.20 AS cms

ARG S6_VERSION
ENV S6_VERSION ${S6_VERSION:-v2.2.0.3}
Expand Down Expand Up @@ -153,54 +153,54 @@ RUN sed -E -i "s/:x:${BUID}:/:x:1919:/g" /etc/passwd \
mariadb-connector-c \
nginx \
nginx-mod-http-lua \
php81 \
php81-fpm \
php81-bcmath \
php81-bz2 \
php81-calendar \
php81-curl \
php81-ctype \
php81-dom \
php81-fileinfo \
php81-ftp \
php81-gd \
php81-intl \
php81-iconv \
php81-imap \
php81-intl \
php81-json \
php81-ldap \
php81-mbstring \
php81-mysqlnd \
php81-openssl \
php81-opcache \
php81-pcntl \
php81-pdo \
php81-pdo_mysql \
php81-pdo_sqlite \
php81-pear \
php81-pecl-imagick \
php81-pecl-xdebug \
php81-phar \
php81-posix \
php81-session \
php81-simplexml \
php81-shmop \
php81-soap \
php81-sockets \
php81-sodium \
php81-sqlite3 \
php81-sysvmsg \
php81-sysvsem \
php81-sysvshm \
php81-tokenizer \
php81-tidy \
php81-xsl \
php81-xml \
php81-xmlreader \
php81-xmlwriter \
php81-zip \
php81-zlib \
php83 \
php83-fpm \
php83-bcmath \
php83-bz2 \
php83-calendar \
php83-curl \
php83-ctype \
php83-dom \
php83-fileinfo \
php83-ftp \
php83-gd \
php83-intl \
php83-iconv \
php83-imap \
php83-intl \
php83-json \
php83-ldap \
php83-mbstring \
php83-mysqlnd \
php83-openssl \
php83-opcache \
php83-pcntl \
php83-pdo \
php83-pdo_mysql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-imagick \
php83-pecl-xdebug \
php83-phar \
php83-posix \
php83-session \
php83-simplexml \
php83-shmop \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-sysvmsg \
php83-sysvsem \
php83-sysvshm \
php83-tokenizer \
php83-tidy \
php83-xsl \
php83-xml \
php83-xmlreader \
php83-xmlwriter \
php83-zip \
php83-zlib \
&& mkdir -p /var/www/web/sites/default/files \
# s6 supervisor setup
&& tar xzf /tmp/s6overlay.tar.gz -C / \
Expand All @@ -217,7 +217,7 @@ RUN sed -E -i "s/:x:${BUID}:/:x:1919:/g" /etc/passwd \
&& mkdir -p /run/nginx/ \
&& touch /run/nginx/nginx.pid \
# php setup
&& ln -s /usr/sbin/php-fpm81 /usr/sbin/php-fpm
&& ln -s /usr/sbin/php-fpm83 /usr/sbin/php-fpm

# new relic setup
COPY bin/src/newrelic.sh /local/newrelic.sh
Expand Down
102 changes: 51 additions & 51 deletions .docker/Dockerfile-www
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

###############################################################
FROM alpine:3.18 AS www
FROM alpine:3.20 AS www

ARG S6_VERSION
ENV S6_VERSION ${S6_VERSION:-v2.2.0.3}
Expand Down Expand Up @@ -49,54 +49,54 @@ RUN sed -E -i "s/:x:${BUID}:/:x:1919:/g" /etc/passwd \
mariadb-connector-c \
nginx \
nginx-mod-http-lua \
php81 \
# php81-fpm \
php81-bcmath \
php81-bz2 \
php81-calendar \
php81-curl \
php81-ctype \
php81-dom \
php81-fileinfo \
php81-ftp \
php81-gd \
php81-intl \
php81-iconv \
php81-imap \
php81-intl \
php81-json \
php81-ldap \
php81-mbstring \
php81-mysqlnd \
php81-openssl \
php81-opcache \
php81-pcntl \
php81-pdo \
php81-pdo_mysql \
php81-pdo_sqlite \
php81-pear \
php81-pecl-imagick \
php81-pecl-xdebug \
php81-phar \
php81-posix \
php81-session \
php81-simplexml \
php81-shmop \
php81-soap \
php81-sockets \
php81-sodium \
php81-sqlite3 \
php81-sysvmsg \
php81-sysvsem \
php81-sysvshm \
php81-tokenizer \
php81-tidy \
php81-xsl \
php81-xml \
php81-xmlreader \
php81-xmlwriter \
php81-zip \
php81-zlib \
php83 \
# php83-fpm \
php83-bcmath \
php83-bz2 \
php83-calendar \
php83-curl \
php83-ctype \
php83-dom \
php83-fileinfo \
php83-ftp \
php83-gd \
php83-intl \
php83-iconv \
php83-imap \
php83-intl \
php83-json \
php83-ldap \
php83-mbstring \
php83-mysqlnd \
php83-openssl \
php83-opcache \
php83-pcntl \
php83-pdo \
php83-pdo_mysql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-imagick \
php83-pecl-xdebug \
php83-phar \
php83-posix \
php83-session \
php83-simplexml \
php83-shmop \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-sysvmsg \
php83-sysvsem \
php83-sysvshm \
php83-tokenizer \
php83-tidy \
php83-xsl \
php83-xml \
php83-xmlreader \
php83-xmlwriter \
php83-zip \
php83-zlib \
&& mkdir -p /var/www/web/sites/default/files \
# s6 supervisor setup
&& tar xzf /tmp/s6overlay.tar.gz -C / \
Expand All @@ -111,10 +111,10 @@ RUN sed -E -i "s/:x:${BUID}:/:x:1919:/g" /etc/passwd \
&& ln -s /dev/stderr /var/log/nginx/error.log \
&& ln -s /dev/stdout /var/log/nginx/access.log \
&& mkdir -p /run/nginx/ \
&& touch /run/nginx/nginx.pid
&& touch /run/nginx/nginx.pid
# \
# php setup
#&& ln -s /usr/sbin/php-fpm81 /usr/sbin/php-fpm
#&& ln -s /usr/sbin/php-fpm83 /usr/sbin/php-fpm

# new relic setup
COPY bin/src/newrelic.sh /local/newrelic.sh
Expand Down
1 change: 1 addition & 0 deletions .docker/src-cms/50_xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ xdebug.client_host=host.docker.internal
xdebug.idekey=VSCODE
xdebug.max_nesting_level=1500
xdebug.mode=debug
# xdebug.start_with_request=1
3 changes: 2 additions & 1 deletion .docker/src-cms/etc/nginx/partials/internal_redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
rewrite ^/analytics-usa-redirect$ https://analytics.usa.gov/ permanent;
rewrite ^/avisos-y-politicas-de-este-sitio$ /es/politicas-avisos-del-sitio-web permanent;
rewrite ^/benefits-grants-loans$ /benefits permanent;
rewrite ^/benefit-finder/([^/]+)/[^/]+$ /benefit-finder/$1 permanent;
rewrite ^/budget$ /federal-budget-process permanent;
rewrite ^/business$ /small-business permanent;
rewrite ^/buying-home$ /buying-home-programs permanent;
Expand Down Expand Up @@ -66,6 +67,7 @@
rewrite ^/espanol/ayuda-financiera-becas-beneficios$ /es/beneficios-gobierno permanent;
rewrite ^/espanol/ayuda-financiera-para-estudiantes$ /es/fafsa-ayuda-federal-estudiantes permanent;
rewrite ^/espanol/beneficios-familias-militares$ /es/beneficios-educativos-laborales-familiares permanent;
rewrite ^/es/buscador-beneficios/([^/]+)/[^/]+$ /es/buscador-beneficios/$1 permanent;
rewrite ^/espanol/cambie-registro-electoral$ /es/actualizar-registro-electoral permanent;
rewrite ^/espanol/chat$ /es/chat permanent;
rewrite ^/espanol/ciudadania-inmigracion-viajes$ /es/inmigracion-ciudadania-estados-unidos permanent;
Expand Down Expand Up @@ -261,6 +263,5 @@
rewrite ^/voting$ /voting-and-elections permanent;
rewrite ^/voting-laws-history$ /voting-laws permanent;


# Any ^espanol/* not otherwise specified links to /es/* (and may 404)
rewrite ^/espanol/(.+)$ /es/$1 permanent;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ daemonize = no

events.mechanism = epoll

include=/etc/php81/php-fpm.d/*.conf
include=/etc/php83/php-fpm.d/*.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ report_memleaks = On
track_errors = Off
html_errors = On

auto_prepend_file = /etc/php81/auto_prepend.php
auto_prepend_file = /etc/php83/auto_prepend.php
auto_append_file =

default_mimetype = "text/html"
Expand Down
11 changes: 10 additions & 1 deletion .docker/src-cron/opt/callcenter/call-center-update
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ tokenResponse=$(
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=$CALL_CENTER_CLIENT_ID&client_secret=$CALL_CENTER_CLIENT_SECRET"
)

token=$(echo "$tokenResponse" | jq -r '.access_token')
if [ $token = "null" ]; then
# log the problem and exit
echo '{"CallCenterWaitTimes": ' "$tokenResponse" ' "level":"error" }'
echo # newline in logs
exit 1
fi

# echo "Getting en wait time."
enWaitTimeResponse=$(
Expand Down Expand Up @@ -65,9 +72,11 @@ combinedWaitTimes='{
}'

# echo "Setting wait time file."
# echo "$combinedWaitTimes" >&2
echo "$combinedWaitTimes" > $waitTimeFile

# Emit data to STDOUT For logging purposes:
echo '{ "CallCenterWaitTimes": ' "$combinedWaitTimes", ' "message":"Retrieved call center wait times" }' | jq -c

# Upload file to S3 bucket
# echo "uploading waittime.json to S3."
aws_cp waittime.json s3://$S3_BUCKET/$VERSION/waittime.json
2 changes: 2 additions & 0 deletions .docker/src-www/etc/nginx/partials/internal_redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
rewrite ^/analytics-usa-redirect$ https://analytics.usa.gov/ permanent;
rewrite ^/avisos-y-politicas-de-este-sitio$ /es/politicas-avisos-del-sitio-web permanent;
rewrite ^/benefits-grants-loans$ /benefits permanent;
rewrite ^/benefit-finder/([^/]+)/[^/]+$ /benefit-finder/$1 permanent;
rewrite ^/budget$ /federal-budget-process permanent;
rewrite ^/business$ /small-business permanent;
rewrite ^/buying-home$ /buying-home-programs permanent;
Expand Down Expand Up @@ -66,6 +67,7 @@
rewrite ^/espanol/ayuda-financiera-becas-beneficios$ /es/beneficios-gobierno permanent;
rewrite ^/espanol/ayuda-financiera-para-estudiantes$ /es/fafsa-ayuda-federal-estudiantes permanent;
rewrite ^/espanol/beneficios-familias-militares$ /es/beneficios-educativos-laborales-familiares permanent;
rewrite ^/es/buscador-beneficios/([^/]+)/[^/]+$ /es/buscador-beneficios/$1 permanent;
rewrite ^/espanol/cambie-registro-electoral$ /es/actualizar-registro-electoral permanent;
rewrite ^/espanol/chat$ /es/chat permanent;
rewrite ^/espanol/ciudadania-inmigracion-viajes$ /es/inmigracion-ciudadania-estados-unidos permanent;
Expand Down
Loading

0 comments on commit c3e98ba

Please sign in to comment.