Switch registry to scaleway

This commit is contained in:
Tobias Reisinger 2024-09-27 22:56:49 +02:00
parent 9ee92797e1
commit f8245550d0
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
7 changed files with 29 additions and 4 deletions

View file

@ -12,6 +12,10 @@ mailer:
acme_dns:
host: acme.serguzim.me
container_registry:
public: "{{ opentofu.scaleway_registry_endpoint_public }}"
private: "{{ opentofu.scaleway_registry_endpoint_private }}"
services_path: /opt/services/

View file

@ -18,3 +18,11 @@ output "scaleway_service_keys" {
value = scaleway_iam_api_key.service_keys
sensitive = true
}
output "scaleway_registry_endpoint_public" {
value = scaleway_registry_namespace.public.endpoint
}
output "scaleway_registry_endpoint_private" {
value = scaleway_registry_namespace.private.endpoint
}

View file

@ -1,6 +1,6 @@
---
backup_image: registry.serguzim.me/services/backup
backup_image: "{{ (container_registry.public, 'services/backup') | path_join }}"
backup_svc:
name: backup

View file

@ -24,7 +24,7 @@ caddy_env:
caddy_compose:
watchtower: false
image: registry.serguzim.me/services/caddy:2-alpine
image: "{{ (container_registry.public, 'services/caddy:2-alpine') | path_join }}"
volumes:
- "./config:/etc/caddy/"
- data:/data

View file

@ -4,7 +4,7 @@ x-common-elements:
&common-elements
build:
context: .
image: registry.serguzim.me/services/healthcheck
image: "{{ (container_registry.public, 'services/healthcheck') | path_join }}"
restart: never
env_file:
- service.env

View file

@ -13,7 +13,7 @@ reitanlage_oranienburg_svc:
reitanlage_oranienburg_compose:
watchtower: false
image: registry.serguzim.me/library/grav
image: "{{ (container_registry.public, 'library/grav') | path_join }}"
volumes:
- data:/var/www/html/
file:

View file

@ -79,3 +79,16 @@ resource "scaleway_iam_api_key" "service_keys" {
application_id = scaleway_iam_application.service_applications[each.key].id
expires_at = time_rotating.rotate_after_a_year.rotation_rfc3339
}
resource "scaleway_registry_namespace" "public" {
name = "public.serguzim.net"
description = "Public container registry for serguzim.net"
is_public = true
}
resource "scaleway_registry_namespace" "private" {
name = "private.serguzim.net"
description = "Private container registry for serguzim.net"
is_public = false
}