update env variable

This commit is contained in:
heyethereum
2024-06-18 23:43:50 +08:00
parent 890a2affb5
commit 1fa79bbd3c
2 changed files with 9 additions and 6 deletions

View File

@@ -68,6 +68,9 @@ jobs:
- name: Create and Start Systemd Service - name: Create and Start Systemd Service
run: | run: |
aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Create and start service" --parameters 'commands=[ aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Create and start service" --parameters 'commands=[
"aws s3 cp s3://s3-bucket-safeqr/update_env_var.sh /home/ssm-user/update_env_var.sh",
"chmod +x /home/ssm-user/update_env_var.sh",
"source /home/ssm-user/.bashrc",
"sudo bash -c '\''cat <<EOF > /etc/systemd/system/springboot-app.service\n[Unit]\nDescription=Spring Boot Application\nAfter=network.target\n\n[Service]\nUser=ssm-user\nExecStart=/usr/bin/java -jar /home/ssm-user/app-0.0.1-SNAPSHOT.jar\nSuccessExitStatus=143\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEOF'\''", "sudo bash -c '\''cat <<EOF > /etc/systemd/system/springboot-app.service\n[Unit]\nDescription=Spring Boot Application\nAfter=network.target\n\n[Service]\nUser=ssm-user\nExecStart=/usr/bin/java -jar /home/ssm-user/app-0.0.1-SNAPSHOT.jar\nSuccessExitStatus=143\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEOF'\''",
"sudo systemctl daemon-reload", "sudo systemctl daemon-reload",
"sudo systemctl enable springboot-app", "sudo systemctl enable springboot-app",

View File

@@ -1,7 +1,7 @@
spring.application.name=SafeQR-app spring.application.name=SafeQR-app
#spring.profiles.active=local #spring.profiles.active=local
http.port=${HTTP_PORT} http.port=${HTTP_PORT}
server.port=8081 server.port=${SERVER_PORT}
server.ssl.enabled=true server.ssl.enabled=true
server.ssl.key-store-type=${SERVER_SSL_KEY_STORE_TYPE} server.ssl.key-store-type=${SERVER_SSL_KEY_STORE_TYPE}
server.ssl.key-store=${SERVER_SSL_KEY_STORE_LOCATION} server.ssl.key-store=${SERVER_SSL_KEY_STORE_LOCATION}