From e530a51d0786b800f0bea00d4ae1b4867217ec66 Mon Sep 17 00:00:00 2001 From: Abraham Montoya Date: Mon, 10 Jun 2024 16:12:51 -0700 Subject: [PATCH] ci: test apprunner yaml file --- apprunner.yaml | 20 ++++++++++++++++++++ template.yml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 apprunner.yaml diff --git a/apprunner.yaml b/apprunner.yaml new file mode 100644 index 0000000..a81a304 --- /dev/null +++ b/apprunner.yaml @@ -0,0 +1,20 @@ +version: 1.0 +runtime: python311 +build: + commands: + build: + - pip3 install -r requirements.txt + - pipenv install + +run: + runtime-version: 3.11 + command: python3 server.py + network: + port: 8000 + env: SERVER_PORT + env: + - name: STAGE + value: "dev" + secrets: + - name: APP + value-from: "arn:aws:secretsmanager:us-west-2:339713191966:secret:stori-app-secrets-dev-SlWppu" \ No newline at end of file diff --git a/template.yml b/template.yml index 1b2a890..95c5e5f 100644 --- a/template.yml +++ b/template.yml @@ -104,28 +104,28 @@ Resources: Value: !Ref Stage CodeConfiguration: ConfigurationSource: REPOSITORY - CodeConfigurationValues: - Runtime: PYTHON_3 - BuildCommand: "pip3 install -r requirements.txt" - StartCommand: "python3 server.py" - Port: 8080 - RuntimeEnvironmentVariables: - - - Name: SERVER_PORT - Value: 8080 - - - Name: STAGE - Value: !Ref Stage - - - Name: BUCKET_NAME - Value: !Ref BucketName - - - Name: SECRET_NAME - Value: !Ref SecretName - RuntimeEnvironmentSecrets: - - - Name: APP_RUNNER_SECRETS - Value: !Sub "arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:stori-app-runner-secrets-6Zk2vI" + # CodeConfigurationValues: + # Runtime: PYTHON_3 + # BuildCommand: "pip3 install -r requirements.txt" + # StartCommand: "python3 server.py" + # Port: 8080 + # RuntimeEnvironmentVariables: + # - + # Name: SERVER_PORT + # Value: 8080 + # - + # Name: STAGE + # Value: !Ref Stage + # - + # Name: BUCKET_NAME + # Value: !Ref BucketName + # - + # Name: SECRET_NAME + # Value: !Ref SecretName + # RuntimeEnvironmentSecrets: + # - + # Name: APP_RUNNER_SECRETS + # Value: !Sub "arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:stori-app-runner-secrets-6Zk2vI" Outputs: