Migrate off of ECS onto sobeck.jdb-software.com.

This commit is contained in:
2024-08-12 12:14:01 -05:00
parent dfaede9fd8
commit 9cbc1e708a
15 changed files with 87 additions and 142 deletions

View File

@ -82,3 +82,20 @@ echo-vars:
"VERSION=$(VERSION)\n" \
"PORT=$(PORT)\n" \
"INTEGRATION_TOKEN=$(INTEGRATION_TOKEN)\n"
publis:
-rm -r deploy
-mkdir deploy
m4 \
-D "HFF_ENTRY_FORMS_API_VERSION=$(VERSION)" \
-D "TARGET_ENV=$(TARGET_ENV)" \
-D "TARGET_PORT=$(TARGET_PORT)" \
hff_entry_forms_api.service \
> deploy/hff_entry_forms_api.$(TARGET_ENV).service
-ssh deployer@$(TARGET_SERVER) "docker stop hff_entry_forms.$(TARGET_ENV).service && sudo systemctl stop hff_entry_forms.$(TARGET_ENV)"
ssh deployer@$(TARGET_SERVER) "aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin $(ECR_ACCOUNT_URL) && docker pull $(ECR_ACCOUNT_URL)/hff_entry_forms:$(VERSION)"
scp \
deploy/hff_entry_forms.$(TARGET_ENV).service \
deployer@$(TARGET_SERVER):/etc/systemd/system/hff_entry_forms.$(TARGET_ENV).service
ssh deployer@$(TARGET_SERVER) "sudo systemctl daemon-reload"
ssh deployer@$(TARGET_SERVER) "sudo systemctl start hff_entry_forms.$(TARGET_ENV)"