diff --git a/.github/workflows/google-gce-dev.yaml b/.github/workflows/google-gce-dev.yaml index caed268b..f2c3fffd 100644 --- a/.github/workflows/google-gce-dev.yaml +++ b/.github/workflows/google-gce-dev.yaml @@ -73,26 +73,29 @@ jobs: - name: Deploy to Compute Engine run: | + # Setup SSH credentials SSH_DIR=~/.ssh mkdir -p $SSH_DIR echo "${{ secrets.GCP_SSH_PRIVATE_KEY }}" > $SSH_DIR/id_rsa chmod 600 $SSH_DIR/id_rsa - ssh-keyscan -H ${{ env.GCP_VM_IP }} >> $SSH_DIR/known_hosts + ssh-keyscan -p ${{ vars.SSH_PORT }} -H ${{ env.GCP_VM_IP }} >> $SSH_DIR/known_hosts # Define remote path - REMOTE_PATH="/home/${{ env.GCP_VM_USER }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}" + REMOTE_PATH="/home/${{ env.GCP_VM_USER }}/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}" # Create remote directory and transfer files in one SSH session echo "Creating remote path" - ssh -i $SSH_DIR/id_rsa ${{ env.GCP_VM_USER }}@${{ env.GCP_VM_IP }} "mkdir -p $REMOTE_PATH" + ssh -p ${{ vars.SSH_PORT }} -i $SSH_DIR/id_rsa ${{ env.GCP_VM_USER }}@${{ env.GCP_VM_IP }} "mkdir -p $REMOTE_PATH" echo "Sending files" - scp -i $SSH_DIR/id_rsa compose.yaml deploy_to_vm.sh ${{ env.GCP_VM_USER }}@${{ env.GCP_VM_IP }}:$REMOTE_PATH + scp -P ${{ vars.SSH_PORT }} -i $SSH_DIR/id_rsa compose.yaml deploy_to_vm.sh ${{ env.GCP_VM_USER }}@${{ env.GCP_VM_IP }}:"$REMOTE_PATH/" - ssh -i $SSH_DIR/id_rsa ${{ env.GCP_VM_USER }}@${{ env.GCP_VM_IP }} 'bash -s' << 'ENDSSH' + echo "Deploy" + # SSH into VM and execute deployment + ssh -p ${{ vars.SSH_PORT }} -i $SSH_DIR/id_rsa ${{ env.GCP_VM_USER }}@${{ env.GCP_VM_IP }} 'bash -s' << 'ENDSSH' # Go to working directory echo "Going to working directory" - cd "/home/${{ env.GCP_VM_USER }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}" + cd "/home/${{ env.GCP_VM_USER }}/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}" # Create .env.gcp file echo "Creating .env.gcp file" diff --git a/api/customAttributes.js b/api/customAttributes.js index 72a37a44..13a8a9d7 100644 --- a/api/customAttributes.js +++ b/api/customAttributes.js @@ -56,7 +56,7 @@ module.exports = function(app) { const retObj = { ...colorMapping, breadcrumbs, - freightYear: 2023, + freightYear: 2024, neverShow: false, geoservice: CANON_GEOSERVICE_API, tesseract: CANON_CONST_TESSERACT, diff --git a/compose.yaml b/compose.yaml index c6c366bd..282e5d47 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,12 +1,10 @@ services: site: &app - container_name: site + container_name: datausa-site image: ${GCP_ARTIFACT_REGISTRY_LOCATION}-docker.pkg.dev/${GCP_PROJECT_ID}/${GCP_ARTIFACT_REGISTRY_NAME}/${GCP_IMAGE_NAME}:${GCP_IMAGE_TAG} restart: always stop_signal: SIGTERM stop_grace_period: 30s - volumes: - - "/home/${GCP_VM_USER}/${GCP_ARTIFACT_REGISTRY_NAME}-${GCP_IMAGE_NAME}/google:/app/google/" env_file: - .env.gcp networks: @@ -14,16 +12,14 @@ services: extra_hosts: - "host.docker.internal:host-gateway" ports: - - "3300:3300" + - "9997:3300" site-1: &app - container_name: site-1 + container_name: datausa-site-1 image: ${GCP_ARTIFACT_REGISTRY_LOCATION}-docker.pkg.dev/${GCP_PROJECT_ID}/${GCP_ARTIFACT_REGISTRY_NAME}/${GCP_IMAGE_NAME}:${GCP_IMAGE_TAG} restart: always stop_signal: SIGTERM stop_grace_period: 30s - volumes: - - "/home/${GCP_VM_USER}/${GCP_ARTIFACT_REGISTRY_NAME}-${GCP_IMAGE_NAME}/google:/app/google/" env_file: - .env.gcp networks: @@ -31,7 +27,7 @@ services: extra_hosts: - "host.docker.internal:host-gateway" ports: - - "3301:3300" + - "9996:3300" networks: site: diff --git a/results-20240930-104515.txt b/results-20240930-104515.txt deleted file mode 100644 index c0e46378..00000000 --- a/results-20240930-104515.txt +++ /dev/null @@ -1,16 +0,0 @@ -https://datausa.io/api/profile/?slug=geo&id=orange-county-northeast-lake-forest-irvine-north-cities-silverado-puma-ca -https://datausa.io/profile/geo/orange-county-northeast-lake-forest-irvine-north-cities-silverado-puma-ca -https://prod-app.datausa.io/api/profile/?slug=geo&id=orange-county-northeast-lake-forest-irvine-north-cities-silverado-puma-ca -https://prod-app.datausa.io/profile/geo/orange-county-northeast-lake-forest-irvine-north-cities-silverado-puma-ca -https://datausa.io/api/profile/?slug=geo&id=summit-county-central-akron-city-puma-oh -https://datausa.io/profile/geo/summit-county-central-akron-city-puma-oh -https://prod-app.datausa.io/api/profile/?slug=geo&id=summit-county-central-akron-city-puma-oh -https://prod-app.datausa.io/profile/geo/summit-county-central-akron-city-puma-oh -https://datausa.io/api/profile/?slug=geo&id=quincy-ma -https://datausa.io/profile/geo/quincy-ma -https://prod-app.datausa.io/api/profile/?slug=geo&id=quincy-ma -https://prod-app.datausa.io/profile/geo/quincy-ma -https://datausa.io/api/profile/?slug=geo&id=benton-county-linn-county-south-corvallis-harrisburg-cities-puma-or -https://datausa.io/profile/geo/benton-county-linn-county-south-corvallis-harrisburg-cities-puma-or -https://prod-app.datausa.io/api/profile/?slug=geo&id=benton-county-linn-county-south-corvallis-harrisburg-cities-puma-or -https://prod-app.datausa.io/profile/geo/benton-county-linn-county-south-corvallis-harrisburg-cities-puma-or