Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to registry.odigos.io #37

Merged
merged 2 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PROJECT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
VERSION := v0.1
VERSION := v0.1.14
REGISTRY := us-central1-docker.pkg.dev/odigos-cloud/components

.PHONY: generate-webapp
generate-webapp:
Expand Down Expand Up @@ -38,11 +39,11 @@ deploy:
.PHONY: build-push-images-prod
build-push-images-prod:
@echo "Building images..."
docker buildx build -t keyval/odigos-demo-frontend:${VERSION} $(PROJECT_DIR)frontend -f $(PROJECT_DIR)frontend/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t keyval/odigos-demo-inventory:${VERSION} $(PROJECT_DIR)inventory -f $(PROJECT_DIR)inventory/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t keyval/odigos-demo-pricing:${VERSION} $(PROJECT_DIR)pricing -f $(PROJECT_DIR)pricing/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t keyval/odigos-demo-coupon:${VERSION} $(PROJECT_DIR)coupon -f $(PROJECT_DIR)coupon/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t keyval/odigos-demo-membership:${VERSION} $(PROJECT_DIR)membership -f $(PROJECT_DIR)membership/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t ${REGISTRY}/odigos-demo-frontend:${VERSION} $(PROJECT_DIR)frontend -f $(PROJECT_DIR)frontend/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t ${REGISTRY}/odigos-demo-inventory:${VERSION} $(PROJECT_DIR)inventory -f $(PROJECT_DIR)inventory/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t ${REGISTRY}/odigos-demo-pricing:${VERSION} $(PROJECT_DIR)pricing -f $(PROJECT_DIR)pricing/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t ${REGISTRY}/odigos-demo-coupon:${VERSION} $(PROJECT_DIR)coupon -f $(PROJECT_DIR)coupon/Dockerfile --platform linux/amd64,linux/arm64 --push
docker buildx build -t ${REGISTRY}/odigos-demo-membership:${VERSION} $(PROJECT_DIR)membership -f $(PROJECT_DIR)membership/Dockerfile --platform linux/amd64,linux/arm64 --push


.PHONY: deploy-membership
Expand Down Expand Up @@ -83,4 +84,4 @@ deploy-frontend:
docker build -t dev/frontend:dev $(PROJECT_DIR)frontend -f $(PROJECT_DIR)frontend/Dockerfile
kind load docker-image dev/frontend:dev
kubectl apply -f $(PROJECT_DIR)frontend/deployment/
kubectl rollout restart deployment frontend
kubectl rollout restart deployment frontend
14 changes: 8 additions & 6 deletions inventory/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
FROM python:3.11 AS builder

# Set environment variables for Python and prevent writing .pyc files
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Install system dependencies
RUN apt-get update \
Expand All @@ -16,21 +16,23 @@ RUN apt-get update \
WORKDIR /app

# Copy only the poetry files to the working directory
COPY poetry.lock pyproject.toml inventory/ /app/
COPY poetry.lock pyproject.toml README.md /app/

COPY inventory/ /app/inventory

# Install Poetry
RUN pip install poetry

# Install project dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev
&& poetry install

# Stage 2: Runtime Stage
FROM python:3.11-slim

# Set environment variables for Python and prevent writing .pyc files
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Create and set the working directory
WORKDIR /app
Expand Down
1 change: 1 addition & 0 deletions inventory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Inventory
10 changes: 5 additions & 5 deletions kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: coupon
image: keyval/odigos-demo-coupon:v0.1.14
image: registry.odigos.io/odigos-demo-coupon:v0.1.14
imagePullPolicy: Always
env:
- name: MEMBERSHIP_SERVICE_HOST
Expand Down Expand Up @@ -52,7 +52,7 @@ spec:
spec:
containers:
- name: frontend
image: keyval/odigos-demo-frontend:v0.1.14
image: registry.odigos.io/odigos-demo-frontend:v0.1.14
imagePullPolicy: Always
env:
- name: INVENTORY_SERVICE_HOST
Expand Down Expand Up @@ -93,7 +93,7 @@ spec:
spec:
containers:
- name: inventory
image: keyval/odigos-demo-inventory:v0.1.14
image: registry.odigos.io/odigos-demo-inventory:v0.1.14
imagePullPolicy: Always
ports:
- containerPort: 8080
Expand Down Expand Up @@ -127,7 +127,7 @@ spec:
spec:
containers:
- name: membership
image: keyval/odigos-demo-membership:v0.1.14
image: registry.odigos.io/odigos-demo-membership:v0.1.14
imagePullPolicy: Always
ports:
- containerPort: 8080
Expand Down Expand Up @@ -161,7 +161,7 @@ spec:
spec:
containers:
- name: pricing
image: keyval/odigos-demo-pricing:v0.1.14
image: registry.odigos.io/odigos-demo-pricing:v0.1.14
imagePullPolicy: Always
ports:
- containerPort: 8080
Expand Down