Skip to content

Commit

Permalink
update to correctly invoke migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ships committed Feb 20, 2024
1 parent 15ac42e commit dc3c7c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 5 additions & 1 deletion infrastructure/terraform/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ module "service_core" {
init_containers = [{
name = "migrations"
image = "${module.cluster.ecr_repository_urls.root}:latest"
command = ["npx", "prisma", "migrate", "deploy"]
command = [
"pnpm", "--filter", "core", "exec",
"dotenv", "-e", ".env.docker", "--",
"prisma", "migrate", "reset", "--force", "--skip-generate",
]
}]

configuration = {
Expand Down
8 changes: 1 addition & 7 deletions infrastructure/terraform/aws/modules/core-services/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ resource "aws_secretsmanager_secret_version" "api_key" {
# generate password and make it accessible through aws secrets manager
resource "random_password" "rds_db_password" {
length = 16
special = true
override_special = "!#$%&*()-_=+[]{}<>:?"
special = false
}

resource "aws_secretsmanager_secret" "rds_db_password" {
Expand Down Expand Up @@ -79,11 +78,6 @@ resource "aws_db_instance" "core_postgres" {
parameter_group_name = "default.postgres14"
skip_final_snapshot = true

lifecycle {
ignore_changes = [
password,
]
}
}


Expand Down

0 comments on commit dc3c7c0

Please sign in to comment.