Skip to content

Commit

Permalink
Set nginx logs to stdout and configure a ecs task role
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltrolezi committed Sep 23, 2024
1 parent f74c735 commit e7f0205
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
- name: Update ECS task definition
run: |
sed -i 's|<ECS_TASK_EXEC_ROLE>|${{ secrets.ECS_TASK_EXEC_ROLE }}|' ./ecs/deployment-task.json
sed -i 's|<ECS_TASK_ROLE>|${{ secrets.ECS_TASK_ROLE }}|' ./ecs/deployment-task.json
sed -i 's|<ECS_SERVICE_NAME>|${{ vars.ECS_SERVICE_NAME }}|' ./ecs/deployment-task.json
sed -i 's|<SSM_NAMESPACE>|${{ secrets.SSM_NAMESPACE }}|' ./ecs/deployment-task.json
sed -i 's|<IMAGE_OCTANE>|${{ secrets.ECR_REPOSITORY_URI }}:latest-octane|' ./ecs/deployment-task.json
Expand Down
4 changes: 2 additions & 2 deletions docker/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ server {
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

access_log off;
error_log /var/log/nginx/gamewatch.log error;
access_log /dev/stdout;
error_log /dev/stderr;

error_page 404 /index.php;

Expand Down
11 changes: 6 additions & 5 deletions ecs/deployment-task.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"executionRoleArn": "<ECS_TASK_EXEC_ROLE>",
"family": "<ECS_SERVICE_NAME>-task",
"executionRoleArn": "<ECS_TASK_EXEC_ROLE>",
"taskRoleArn": "<ECS_TASK_ROLE>",
"requiresCompatibilities": ["EC2"],
"cpu": "256",
"memory": "512",
"networkMode": "bridge",
"containerDefinitions": [
{
Expand Down Expand Up @@ -183,8 +187,5 @@
}
}
}
],
"requiresCompatibilities": ["EC2"],
"cpu": "256",
"memory": "512"
]
}

0 comments on commit e7f0205

Please sign in to comment.