Skip to content

Commit 999d8bf

Browse files
committed
Setup vendir for automatic compose updates
1 parent 0d0e1d3 commit 999d8bf

7 files changed

Lines changed: 29 additions & 5 deletions

File tree

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
terraform 1.5.7
2+
vendir 0.46.0

modules/docker/codezero/compose.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ ENV
5757
resource "terraform_data" "env_file" {
5858
triggers_replace = [
5959
sha256(local.override_env_content),
60-
filesha256("${path.module}/.env"),
61-
filesha256("${path.module}/docker-compose.yml"),
60+
filesha256("${path.module}/vendor/.env"),
61+
filesha256("${path.module}/vendor/docker-compose.yml"),
6262
filesha256("${path.module}/docker-compose.override.yml"),
6363
filesha256("${path.module}/docker-compose.actions.yml"),
6464
]
@@ -76,15 +76,17 @@ resource "terraform_data" "env_file" {
7676
resource "docker_compose" "codezero" {
7777
project_name = "codezero"
7878
env_files = [
79-
"${path.module}/.env",
79+
"${path.module}/vendor/.env",
8080
"${path.module}/override.env",
8181
]
8282
config_paths = [
83-
"${path.module}/docker-compose.yml",
83+
"${path.module}/vendor/docker-compose.yml",
8484
"${path.module}/docker-compose.override.yml",
8585
"${path.module}/docker-compose.actions.yml",
8686
]
8787

88+
project_directory = path.module
89+
8890
depends_on = [terraform_data.env_file]
8991

9092
lifecycle {

modules/docker/codezero/docker-compose.override.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
config-generator:
33
env_file: !override
4-
- .env
4+
- vendor/.env
55
- override.env
66
nginx:
77
networks:
File renamed without changes.

vendir.lock.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: vendir.k14s.io/v1alpha1
2+
directories:
3+
- contents:
4+
- git:
5+
commitTitle: "fix: correct file path for aquila config"
6+
sha: 31806fcb5b983282045c3ff32e9b2c1d732b90cd
7+
path: .
8+
path: modules/docker/codezero/vendor
9+
kind: LockConfig

vendir.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: vendir.k14s.io/v1alpha1
2+
kind: Config
3+
minimumRequiredVersion: 0.11.0
4+
directories:
5+
- path: modules/docker/codezero/vendor
6+
contents:
7+
- path: .
8+
git:
9+
url: https://github.com/code0-tech/reticulum
10+
ref: origin/main
11+
newRootPath: docker-compose

0 commit comments

Comments
 (0)