Skip to content

Commit

Permalink
migrate staging legacy sftp to local repo image to avoid docker auth …
Browse files Browse the repository at this point in the history
…issues
  • Loading branch information
JosiahSiegel committed Jul 22, 2024
1 parent 257f27d commit b230b0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/publish_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- master
- josiahsiegel/update/sftpalpine-image
schedule:
- cron: "0 0 1 * *"

Expand Down Expand Up @@ -60,8 +59,6 @@ jobs:
id: check_sftp_alpine_image
run: |
docker pull atmoz/sftp:alpine
docker tag atmoz/sftp:alpine ghcr.io/cdcgov/prime-reportstream_sftp:alpine
docker push ghcr.io/cdcgov/prime-reportstream_sftp:alpine
docker pull ${{ env.REGISTRY }}/${{ env.SFTP_IMAGE_NAME }}:alpine
LATEST_IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' atmoz/sftp:alpine)
REPO_IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ${{ env.REGISTRY }}/${{ env.SFTP_IMAGE_NAME }}:alpine 2> /dev/null || true)
Expand Down
21 changes: 3 additions & 18 deletions operations/app/terraform/modules/sftp_container/main.tf
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
resource "azurerm_network_profile" "sftp_vnet_network_profile" {
name = "sftp_vnet_network_profile"
location = var.location
resource_group_name = var.resource_group

container_network_interface {
name = "sftp_container_vnet_network_interface"
ip_configuration {
name = "sftp_container_vnet_ip_configuration"
subnet_id = data.azurerm_subnet.container_subnet.id
}
}
}

resource "azurerm_container_group" "sftp_container" {
name = "${var.resource_prefix}-sftpserver"
location = var.location
resource_group_name = var.resource_group
ip_address_type = "Private"
network_profile_id = azurerm_network_profile.sftp_vnet_network_profile.id
subnet_ids = [data.azurerm_subnet.container_subnet.id]
os_type = "Linux"
restart_policy = "Always"

Expand All @@ -29,7 +15,7 @@ resource "azurerm_container_group" "sftp_container" {

container {
name = "${var.resource_prefix}-sftpserver"
image = "atmoz/sftp:alpine"
image = "ghcr.io/cdcgov/prime-reportstream_sftp:alpine"
cpu = 1.0
memory = 1.5

Expand Down Expand Up @@ -60,8 +46,7 @@ resource "azurerm_container_group" "sftp_container" {
}

depends_on = [
azurerm_storage_share.sftp_share,
azurerm_network_profile.sftp_vnet_network_profile
azurerm_storage_share.sftp_share
]
}

Expand Down

0 comments on commit b230b0d

Please sign in to comment.