Skip to content

Commit

Permalink
adjust compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
jschluchter committed Jun 27, 2023
2 parents 96c5d75 + a1f2a6e commit c1816c3
Show file tree
Hide file tree
Showing 21 changed files with 428 additions and 351 deletions.
18 changes: 9 additions & 9 deletions .devcontainer/installMoreTools.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

###################
# mongodb-mongosh
###################
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-mongosh
#!/bin/bash

###################
# mongodb-mongosh
###################
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-mongosh
55 changes: 31 additions & 24 deletions .github/workflows/package-ai-service.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,59 @@
name: package-ai-service

on:
push:
branches:
- 'main'
paths:
- 'ai-service/**'

workflow_dispatch:

jobs:
set-env:
name: Set Environment Variables
publish-container-image:

runs-on: ubuntu-latest
outputs:
version: ${{ steps.main.outputs.version }}
created: ${{ steps.main.outputs.created }}
project: ${{ steps.main.outputs.project }}
image: ${{ steps.main.outputs.image }}
repository: ${{ steps.main.outputs.repository }}

steps:
- id: main
- name: Set environment variables
id: set-variables
run: |
echo ::set-output name=version::$(echo ${GITHUB_SHA} | cut -c1-7)
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=project::ai-service
echo ::set-output name=image::ai-service
echo ::set-output name=repository::ghcr.io/azure-samples/aks-store-demo
echo "REPOSITORY=ghcr.io/azure-samples/aks-store-demo" >> "$GITHUB_OUTPUT"
echo "IMAGE=ai-service" >> "$GITHUB_OUTPUT"
echo "VERSION=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"
echo "CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
package-service:
name: Package Service
runs-on: ubuntu-latest
needs: set-env
steps:
- name: Checkout
- name: Env variable output
id: test-variables
run: |
echo ${{ steps.set-variables.outputs.REPOSITORY }}
echo ${{ steps.set-variables.outputs.IMAGE }}
echo ${{ steps.set-variables.outputs.VERSION }}
echo ${{ steps.set-variables.outputs.CREATED }}
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: src/ai-service
file: src/ai-service/Dockerfile
push: true
tags: |
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:latest
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:${{ needs.set-env.outputs.version }}
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:latest
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:${{ steps.set-variables.outputs.VERSION }}
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.created=${{ needs.set-env.outputs.created }}
org.opencontainers.image.revision=${{ needs.set-env.outputs.version }}
org.opencontainers.image.created=${{ steps.set-variables.outputs.CREATED }}
org.opencontainers.image.revision=${{ steps.set-variables.outputs.VERSION }}
55 changes: 31 additions & 24 deletions .github/workflows/package-makeline-service.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,59 @@
name: package-makeline-service

on:
push:
branches:
- 'main'
paths:
- 'makeline-service/**'

workflow_dispatch:

jobs:
set-env:
name: Set Environment Variables
publish-container-image:

runs-on: ubuntu-latest
outputs:
version: ${{ steps.main.outputs.version }}
created: ${{ steps.main.outputs.created }}
project: ${{ steps.main.outputs.project }}
image: ${{ steps.main.outputs.image }}
repository: ${{ steps.main.outputs.repository }}

steps:
- id: main
- name: Set environment variables
id: set-variables
run: |
echo ::set-output name=version::$(echo ${GITHUB_SHA} | cut -c1-7)
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=project::makeline-service
echo ::set-output name=image::makeline-service
echo ::set-output name=repository::ghcr.io/azure-samples/aks-store-demo
echo "REPOSITORY=ghcr.io/azure-samples/aks-store-demo" >> "$GITHUB_OUTPUT"
echo "IMAGE=makeline-service" >> "$GITHUB_OUTPUT"
echo "VERSION=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"
echo "CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
package-service:
name: Package Service
runs-on: ubuntu-latest
needs: set-env
steps:
- name: Checkout
- name: Env variable output
id: test-variables
run: |
echo ${{ steps.set-variables.outputs.REPOSITORY }}
echo ${{ steps.set-variables.outputs.IMAGE }}
echo ${{ steps.set-variables.outputs.VERSION }}
echo ${{ steps.set-variables.outputs.CREATED }}
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: src/makeline-service
file: src/makeline-service/Dockerfile
push: true
tags: |
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:latest
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:${{ needs.set-env.outputs.version }}
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:latest
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:${{ steps.set-variables.outputs.VERSION }}
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.created=${{ needs.set-env.outputs.created }}
org.opencontainers.image.revision=${{ needs.set-env.outputs.version }}
org.opencontainers.image.created=${{ steps.set-variables.outputs.CREATED }}
org.opencontainers.image.revision=${{ steps.set-variables.outputs.VERSION }}
55 changes: 31 additions & 24 deletions .github/workflows/package-order-service.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,59 @@
name: package-order-service

on:
push:
branches:
- 'main'
paths:
- 'order-service/**'

workflow_dispatch:

jobs:
set-env:
name: Set Environment Variables
publish-container-image:

runs-on: ubuntu-latest
outputs:
version: ${{ steps.main.outputs.version }}
created: ${{ steps.main.outputs.created }}
project: ${{ steps.main.outputs.project }}
image: ${{ steps.main.outputs.image }}
repository: ${{ steps.main.outputs.repository }}

steps:
- id: main
- name: Set environment variables
id: set-variables
run: |
echo ::set-output name=version::$(echo ${GITHUB_SHA} | cut -c1-7)
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=project::order-service
echo ::set-output name=image::order-service
echo ::set-output name=repository::ghcr.io/azure-samples/aks-store-demo
echo "REPOSITORY=ghcr.io/azure-samples/aks-store-demo" >> "$GITHUB_OUTPUT"
echo "IMAGE=order-service" >> "$GITHUB_OUTPUT"
echo "VERSION=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"
echo "CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
package-service:
name: Package Service
runs-on: ubuntu-latest
needs: set-env
steps:
- name: Checkout
- name: Env variable output
id: test-variables
run: |
echo ${{ steps.set-variables.outputs.REPOSITORY }}
echo ${{ steps.set-variables.outputs.IMAGE }}
echo ${{ steps.set-variables.outputs.VERSION }}
echo ${{ steps.set-variables.outputs.CREATED }}
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: src/order-service
file: src/order-service/Dockerfile
push: true
tags: |
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:latest
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:${{ needs.set-env.outputs.version }}
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:latest
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:${{ steps.set-variables.outputs.VERSION }}
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.created=${{ needs.set-env.outputs.created }}
org.opencontainers.image.revision=${{ needs.set-env.outputs.version }}
org.opencontainers.image.created=${{ steps.set-variables.outputs.CREATED }}
org.opencontainers.image.revision=${{ steps.set-variables.outputs.VERSION }}
55 changes: 31 additions & 24 deletions .github/workflows/package-product-service.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,59 @@
name: package-product-service

on:
push:
branches:
- 'main'
paths:
- 'product-service/**'

workflow_dispatch:

jobs:
set-env:
name: Set Environment Variables
publish-container-image:

runs-on: ubuntu-latest
outputs:
version: ${{ steps.main.outputs.version }}
created: ${{ steps.main.outputs.created }}
project: ${{ steps.main.outputs.project }}
image: ${{ steps.main.outputs.image }}
repository: ${{ steps.main.outputs.repository }}

steps:
- id: main
- name: Set environment variables
id: set-variables
run: |
echo ::set-output name=version::$(echo ${GITHUB_SHA} | cut -c1-7)
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=project::product-service
echo ::set-output name=image::product-service
echo ::set-output name=repository::ghcr.io/azure-samples/aks-store-demo
echo "REPOSITORY=ghcr.io/azure-samples/aks-store-demo" >> "$GITHUB_OUTPUT"
echo "IMAGE=product-service" >> "$GITHUB_OUTPUT"
echo "VERSION=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"
echo "CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
package-service:
name: Package Service
runs-on: ubuntu-latest
needs: set-env
steps:
- name: Checkout
- name: Env variable output
id: test-variables
run: |
echo ${{ steps.set-variables.outputs.REPOSITORY }}
echo ${{ steps.set-variables.outputs.IMAGE }}
echo ${{ steps.set-variables.outputs.VERSION }}
echo ${{ steps.set-variables.outputs.CREATED }}
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: src/product-service
file: src/product-service/Dockerfile
push: true
tags: |
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:latest
${{ needs.set-env.outputs.repository }}/${{ needs.set-env.outputs.image }}:${{ needs.set-env.outputs.version }}
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:latest
${{ steps.set-variables.outputs.REPOSITORY }}/${{ steps.set-variables.outputs.IMAGE }}:${{ steps.set-variables.outputs.VERSION }}
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.created=${{ needs.set-env.outputs.created }}
org.opencontainers.image.revision=${{ needs.set-env.outputs.version }}
org.opencontainers.image.created=${{ steps.set-variables.outputs.CREATED }}
org.opencontainers.image.revision=${{ steps.set-variables.outputs.VERSION }}
Loading

0 comments on commit c1816c3

Please sign in to comment.