Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Updating docker image and accompanying variables #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 63 additions & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ resource "aws_ecs_service" "ubersystem_web" {
load_balancer {
target_group_arn = aws_lb_target_group.ubersystem_web.arn
container_name = "web"
container_port = 8282
container_port = 80
}
}

Expand All @@ -107,22 +107,26 @@ resource "aws_ecs_task_definition" "ubersystem_web" {
"entryPoint": [],
"portMappings": [
{
"hostPort": 8282,
"hostPort": 80,
"protocol": "tcp",
"containerPort": 8282
"containerPort": 80
}
],
"command": [],
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "CERT_NAME",
"value": "ssl"
"name": "HOSTNAME",
"value": "${var.hostname}"
},
{
"name": "VIRTUAL_HOST",
"value": "${var.hostname}"
"name": "DEFAULT_URL",
"value": "/"
},
{
"name": "PORT",
"value": "80"
}
],
"resourceRequirements": null,
Expand All @@ -141,7 +145,7 @@ resource "aws_ecs_task_definition" "ubersystem_web" {
"memoryReservation": null,
"volumesFrom": [],
"stopTimeout": null,
"image": "bitbyt3r/ubersystem:latest",
"image": "ghcr.io/magfest/magprime:main",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
Expand Down Expand Up @@ -236,7 +240,24 @@ resource "aws_ecs_task_definition" "ubersystem_celery" {
],
"linuxParameters": null,
"cpu": 0,
"environment": null,
"environment": [
{
"name": "BROKER_HOST",
"value": "rabbitmq"
},
{
"name": "BROKER_PORT",
"value": "6379"
},
{
"name": "BROKER_USER",
"value": "celery"
},
{
"name": "BROKER_VHOST",
"value": "uber"
}
],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
Expand All @@ -246,14 +267,18 @@ resource "aws_ecs_task_definition" "ubersystem_celery" {
{
"name": "DB_CONNECTION_STRING",
"valueFrom": "${var.db_secret}"
},
{
"name": "BROKER_PASS",
"valueFrom": "${var.broker_password}"
}
],
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": null,
"volumesFrom": [],
"stopTimeout": null,
"image": "bitbyt3r/ubersystem:latest",
"image": "ghcr.io/magfest/magprime:main",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
Expand Down Expand Up @@ -289,7 +314,24 @@ resource "aws_ecs_task_definition" "ubersystem_celery" {
"command": [],
"linuxParameters": null,
"cpu": 0,
"environment": null,
"environment": [
{
"name": "BROKER_HOST",
"value": "rabbitmq"
},
{
"name": "BROKER_PORT",
"value": "6379"
},
{
"name": "BROKER_USER",
"value": "celery"
},
{
"name": "BROKER_VHOST",
"value": "uber"
}
],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
Expand All @@ -299,6 +341,10 @@ resource "aws_ecs_task_definition" "ubersystem_celery" {
{
"name": "DB_CONNECTION_STRING",
"valueFrom": "${var.db_secret}"
},
{
"name": "BROKER_PASS",
"valueFrom": "${var.broker_password}"
}
],
"dockerSecurityOptions": null,
Expand Down Expand Up @@ -411,10 +457,6 @@ resource "aws_ecs_task_definition" "rabbitmq" {
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "RABBITMQ_DEFAULT_PASS",
"value": "celery"
},
{
"name": "RABBITMQ_DEFAULT_USER",
"value": "celery"
Expand All @@ -429,7 +471,12 @@ resource "aws_ecs_task_definition" "rabbitmq" {
"dnsServers": null,
"mountPoints": [],
"workingDirectory": null,
"secrets": null,
"secrets": [
{
"name": "RABBITMQ_DEFAULT_PASS",
"valueFrom": "${var.broker_password}"
}
],
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": null,
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ variable "db_secret" {

default = "null"
}

variable "broker_password" {
type = string

default = "celery"
}