From 2387e73d77eb41b336f43ddaa3590b40fa74fca0 Mon Sep 17 00:00:00 2001 From: Eduardo Kroetz Date: Sat, 18 May 2024 20:01:21 -0300 Subject: [PATCH] Ajustando arquivos de deploy --- appspec.yml | 16 ++++++++++------ scripts/after_install.sh | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/appspec.yml b/appspec.yml index d0ae401..4cf8f3f 100644 --- a/appspec.yml +++ b/appspec.yml @@ -3,22 +3,26 @@ os: linux files: - source: HotelSistem/Hotel.Domain/api destination: /var/www/api - - source: / - destination: /var/www/hotelsistem + - source: scripts/ + destination: /var/www/hotelsistem/scripts + - source: buildspec.yml + destination: /var/www/hotelsistem/buildspec.yml + - source: HotelSistem.service + destination: /var/www/hotelsistem/HotelSistem.service hooks: BeforeInstall: - - location: scripts/before_install.sh + - location: /var/www/hotelsistem/scripts/before_install.sh timeout: 300 runas: root AfterInstall: - - location: scripts/after_install.sh + - location: /var/www/hotelsistem/scripts/after_install.sh timeout: 300 runas: root ApplicationStart: - - location: scripts/start_server.sh + - location: /var/www/hotelsistem/scripts/start_server.sh timeout: 300 runas: root ValidateService: - - location: scripts/validate_service.sh + - location: /var/www/hotelsistem/scripts/validate_service.sh timeout: 300 runas: root diff --git a/scripts/after_install.sh b/scripts/after_install.sh index ce6afa1..ea056d0 100644 --- a/scripts/after_install.sh +++ b/scripts/after_install.sh @@ -1,6 +1,6 @@ #!/bin/bash # Create the directory for the application if it doesn't exist -mkdir -p /var/www/hotelsistem +mkdir -p /var/www/api # Copy the service file to the systemd directory cp /var/www/hotelsistem/scripts/hotelsistem.service /etc/systemd/system/hotelsistem.service