]> git.puffer.fish Git - matthieu/nova.git/commitdiff
add tag per architecture
authorMatthieuCoder <matthieu@matthieu-dev.xyz>
Fri, 20 Jan 2023 17:37:17 +0000 (21:37 +0400)
committerMatthieuCoder <matthieu@matthieu-dev.xyz>
Fri, 20 Jan 2023 17:37:17 +0000 (21:37 +0400)
.env
.github/workflows/docker-publish.yml
docker-compose.yaml

diff --git a/.env b/.env
index 156276e1e8252ee01d710d94f32f91041ba92795..374b0bfe3fcadd9b9f7a358b8ea0a8da7a2994f4 100644 (file)
--- a/.env
+++ b/.env
@@ -1,11 +1 @@
-GRAFANA_SERVICE_PORT=3000
-GRAFANA_SERVICE_HOST=grafana
-
-# Jaeger
-JAEGER_SERVICE_PORT=16686
-JAEGER_SERVICE_HOST=jaeger
-
-# Prometheus
-PROMETHEUS_SERVICE_PORT=9090
-PROMETHEUS_SERVICE_HOST=prometheus
-PROMETHEUS_ADDR=${PROMETHEUS_SERVICE_HOST}:${PROMETHEUS_SERVICE_PORT}
\ No newline at end of file
+TAG=amd64
index acaf9eb1f521026d75c7b75b19cfdff66c951231..93f4eaf90c46f274d45a2e670ab76b4d582e6a03 100644 (file)
@@ -37,7 +37,11 @@ jobs:
           registry: ${{ env.REGISTRY }}
           username: ${{ github.actor }}
           password: ${{ secrets.GITHUB_TOKEN }}
-
+      - name: Create tag
+        run: |
+          export TAG="${{ matrix.platform }}"
+          export TAG=${TAG/linux\//}
+          echo ${TAG//\//-} > .env
       - name: Build and push
         uses: docker/bake-action@v2
         with:
index c99ab205733551662e2b6bc980f3254fcaa2a445..6147bd31f5a2677a1d7b0a8cb9c465f500ce4fe8 100644 (file)
@@ -14,16 +14,10 @@ services:
   mock:
     image: nginx
   cache:
-    image: ghcr.io/discordnova/nova/cache
+    image: ghcr.io/discordnova/nova/cache:${TAG:-latest}
     restart: always
     build: 
       context: .
-      x-bake:
-        platforms:
-          - linux/amd64
-          - linux/arm64/v8
-          - linux/arm/v7
-          
       args:
         - COMPONENT=cache
     volumes:
@@ -36,18 +30,12 @@ services:
       - otelcol
   
   gateway:
-    image: ghcr.io/discordnova/nova/gateway
+    image: ghcr.io/discordnova/nova/gateway:${TAG:-latest}
     restart: always
     build: 
       context: .
       args:
         - COMPONENT=gateway
-      x-bake:
-        platforms:
-          - linux/amd64
-          - linux/arm64/v8
-          - linux/arm/v7
-          
     volumes:
       - ./config/default.yml:/config/default.yml
     environment:
@@ -57,18 +45,12 @@ services:
       - otelcol
 
   rest:
-    image: ghcr.io/discordnova/nova/rest
+    image: ghcr.io/discordnova/nova/rest:${TAG:-latest}
     restart: always
     build: 
       context: .
       args:
         - COMPONENT=rest
-      x-bake:
-        platforms:
-          - linux/amd64
-          - linux/arm64/v8
-          - linux/arm/v7
-          
     volumes:
       - ./config/default.yml:/config/default.yml
     environment:
@@ -81,19 +63,12 @@ services:
       - 8090:8090
 
   webhook:
-    image: ghcr.io/discordnova/nova/webhook
+    image: ghcr.io/discordnova/nova/webhook:${TAG:-latest}
     restart: always
     build: 
       context: .
       args:
-        - RUST_LOG=debug
         - COMPONENT=webhook
-      x-bake:
-        platforms:
-          - linux/amd64
-          - linux/arm64/v8
-          - linux/arm/v7
-          
     volumes:
       - ./config/default.yml:/config/default.yml
     environment:
@@ -105,18 +80,12 @@ services:
       - 9002:9000
       - 8091:8091
   ratelimit:
-    image: ghcr.io/discordnova/nova/ratelimit
+    image: ghcr.io/discordnova/nova/ratelimit:${TAG:-latest}
     restart: always
     build: 
       context: .
       args:
         - COMPONENT=ratelimit
-      x-bake:
-        platforms:
-          - linux/amd64
-          - linux/arm64/v8
-          - linux/arm/v7
-          
     volumes:
       - ./config/default.yml:/config/default.yml
     environment:
@@ -144,7 +113,6 @@ services:
           memory: 275M
     restart: always
     ports:
-      - "${JAEGER_SERVICE_PORT}:${JAEGER_SERVICE_PORT}"                    # Jaeger UI
       - "4317"                           # OTLP gRPC default port
     environment:
       - COLLECTOR_OTLP_ENABLED=true
@@ -158,7 +126,7 @@ services:
       - ./otel/grafana/grafana.ini:/etc/grafana/grafana.ini
       - ./otel/grafana/provisioning/:/etc/grafana/provisioning/
     ports:
-      - "${GRAFANA_SERVICE_PORT}:${GRAFANA_SERVICE_PORT}"
+      - "3000:3000"
 
   # OpenTelemetry Collector
   otelcol:
@@ -194,5 +162,3 @@ services:
       - --web.route-prefix=/
     volumes:
       - ./otel/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml
-    ports:
-      - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}"