Skip to content

Commit

Permalink
chore(Various): Some cleanup changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KevSanchez committed Nov 25, 2024
1 parent 61a55ed commit afa0d1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 96 deletions.
94 changes: 0 additions & 94 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,97 +314,3 @@ jobs:
region: ${{ secrets.TF_AWS_REGION }}
version_label: ${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
deployment_package: infrastructure/source_bundle/deploy.zip

#Add this block to the docker compose file generation once tiler server is confirmed.
# echo " tiler:" >> docker-compose.yml
# echo " image: $ECR_REGISTRY/$ECR_REPOSITORY_TILER:$IMAGE_TAG" >> docker-compose.yml
# echo " restart: always" >> docker-compose.yml
# echo " ports:" >> docker-compose.yml
# echo " - 1337:1337" >> docker-compose.yml

# build_tiler_image:
# name: Build Tiler Server image and push to Amazon ECR
# runs-on: ubuntu-latest
# env:
# APP_ENV_PREFIX: TILER_ENV
# APP_ENV_PATH: tiler/.env
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - uses: dorny/paths-filter@v3
# id: tiler-changes
# with:
# filters: |
# tiler:
# - 'tiler/**'
# - '.github/workflows/**'
#
# - name: Applicable check
# id: applicable_check
# run: |
# {
# echo "flag=${{ github.event_name == 'workflow_dispatch' || steps.tiler-changes.outputs.tiler == 'true' }}"
# } >> $GITHUB_OUTPUT
#
# - name: Extract branch name
# if: ${{ steps.applicable_check.outputs.flag }}
# run: |
# {
# branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
# echo "branch=${branch}"
# echo "branch_upper=${branch^^}"
# } >> $GITHUB_OUTPUT
# id: extract_branch
#
# - name: Set environment name
# if: ${{ steps.applicable_check.outputs.flag }}
# id: environment_name
# run: |
# {
# echo "ENVIRONMENT=${{ inputs.ENVIRONMENT_NAME_OVERRIDE || steps.extract_branch.outputs.branch == 'main' && 'PRODUCTION' || steps.extract_branch.outputs.branch_upper }}"
# } >> $GITHUB_ENV
#
# - name: Output secrets and vars as JSON
# if: ${{ steps.applicable_check.outputs.flag }}
# # Use GH Actions toJSON function to convert secrets and vars to JSON; in case no values present, output null (otherwise jq will fail)
# run: |
# {
# echo 'secrets<<EOF'
# echo '${{ secrets != null && toJSON(secrets) || null }}'
# echo 'EOF'
# echo 'vars<<EOF'
# echo '${{ vars != null && toJSON(vars) || null }}'
# echo 'EOF'
# } >> $GITHUB_OUTPUT
# id: env_json
#
# - name: Generate Env file from Secrets/Vars
# id: generate_env_file
# if: ${{ steps.applicable_check.outputs.flag }}
# uses: ./.github/actions/generate-env-file-from-json
# with:
# ENVIRONMENT: ${{ env.ENVIRONMENT }}
# APP_ENV_PREFIX: ${{ env.APP_ENV_PREFIX }}
# secrets_json: ${{ steps.env_json.outputs.secrets }}
# vars_json: ${{ steps.env_json.outputs.vars }}
#
# - name: Save .env file
# if: ${{ steps.applicable_check.outputs.flag }}
# run: |
# echo '${{ steps.generate_env_file.outputs.env_file }}' >> $APP_ENV_PATH
# cat $APP_ENV_PATH
#
# - name: Build, tag, and push Client image to Amazon ECR
# if: ${{ steps.applicable_check.outputs.flag }}
# id: build_and_push
# uses: ./.github/actions/build-and-push-to-ecr
# with:
# PIPELINE_USER_ACCESS_KEY_ID: ${{ secrets.TF_PIPELINE_USER_ACCESS_KEY_ID }}
# PIPELINE_USER_SECRET_ACCESS_KEY: ${{ secrets.TF_PIPELINE_USER_SECRET_ACCESS_KEY }}
# AWS_REGION: ${{ secrets.TF_AWS_REGION }}
# REPOSITORY_NAME: ${{ secrets.TF_TILER_REPOSITORY_NAME }}
# COMPONENT_PATH: './tiler'
# ENVIRONMENT_LOWER: ${{ steps.extract_branch.outputs.branch == 'main' && 'production' || steps.extract_branch.outputs.branch }}
# DRY_RUN: ${{ inputs.dry_run }}
2 changes: 1 addition & 1 deletion infrastructure/base/modules/bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "aws_s3_bucket_cors_configuration" "bucket_cors_configuration" {
cors_rule {
allowed_headers = ["*"]
allowed_methods = ["GET"]
allowed_origins = ["https://${var.domain}"]
allowed_origins = ["https://${var.domain}", "http://localhost:3000"]
expose_headers = []
max_age_seconds = 3000
}
Expand Down
3 changes: 2 additions & 1 deletion infrastructure/base/vars/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
aws_region = "af-south-1" //il-central is much closer geographically but separated by sea, af-south-1 is on the same continent but on the far south
allowed_account_id = "533267347591"
project_name = "wims-ss"
repo_name = "wims-south-sudan"
repo_name = "south-sudan-pilot"
//repo_name = "wims-south-sudan"

staging_domain = "ss-hydro-pilot.gmv.com"
staging_ec2_instance_type = "m5.large"
Expand Down

0 comments on commit afa0d1c

Please sign in to comment.