Skip to content

Commit fa984a4

Browse files
committed
changes
1 parent 52806ac commit fa984a4

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ jobs:
253253
permissions:
254254
packages: write
255255
contents: read
256-
environment:
257-
name: ${{ fromJSON('["pastaporto", "production"]')[github.ref == 'refs/heads/main'] }}
258256

259257
steps:
260258
- uses: actions/checkout@v4

frontend/src/pages/api/health.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default async function handler(req, res) {
2+
return res.json({ ok: true });
3+
}

infrastructure/applications/pycon_backend/worker.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ locals {
3030
},
3131
{
3232
name = "ALLOWED_HOSTS",
33-
value = ".pycon.it"
33+
value = ".pycon.it,${var.server_ip}"
3434
},
3535
{
3636
name = "DJANGO_SETTINGS_MODULE",

infrastructure/applications/pycon_frontend/task.tf

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
locals {
22
is_prod = terraform.workspace == "production"
33
alias = local.is_prod ? "frontend.pycon.it" : "${terraform.workspace}-frontend.pycon.it"
4+
admin_host = local.is_prod ? "admin.pycon.it" : "${terraform.workspace}-admin.pycon.it"
45
}
56

67
resource "aws_ecs_task_definition" "pycon_frontend" {
@@ -27,10 +28,17 @@ resource "aws_ecs_task_definition" "pycon_frontend" {
2728
name = "CONFERENCE_CODE"
2829
value = module.secrets.value.conference_code
2930
},
31+
{
32+
name = "REVALIDATE_SECRET"
33+
value = module.secrets.value.revalidate_secret
34+
},
35+
{
36+
name = "CMS_ADMIN_HOST"
37+
value = local.admin_host
38+
},
3039
{
3140
name = "API_URL_SERVER",
32-
# value = "http://${var.server_ip}"
33-
value = local.is_prod ? "https://admin.pycon.it" : "https://pastaporto-admin.pycon.it"
41+
value = "http://${var.server_ip}"
3442
}
3543
]
3644

@@ -56,7 +64,7 @@ resource "aws_ecs_task_definition" "pycon_frontend" {
5664
retries = 3
5765
command = [
5866
"CMD-SHELL",
59-
"echo 1"
67+
"wget http://localhost:3000/api/health || exit 1"
6068
]
6169
timeout = 3
6270
interval = 10

0 commit comments

Comments
 (0)