Skip to content

Commit a897606

Browse files
committed
Some fixes for the container and helm build/install
1 parent bfa9fbc commit a897606

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/mrmat-python-api-fastapi.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
GIT_SHA := $(shell git rev-parse --short HEAD)
66
VERSION ?= 0.0.0-dev0.${GIT_SHA}
77
PYTHON_VERSION := $(shell echo "${VERSION}" | sed -e 's/-dev0\./-dev0+/')
8+
WHEEL_VERSION := $(shell echo "${VERSION}" | sed -e 's/-dev0\./.dev0+/')
9+
10+
ROOT_PATH := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
811

912
PYTHON_SOURCES := $(shell find src/mrmat_python_api_fastapi -name '*.py')
10-
PYTHON_TARGET := dist/mrmat_python_api_fastapi-${PYTHON_VERSION}-py3-none-any.whl
13+
PYTHON_TARGET := dist/mrmat_python_api_fastapi-${WHEEL_VERSION}-py3-none-any.whl
1114
CONTAINER_SOURCES := $(shell find var/container)
1215
HELM_SOURCES := $(shell find var/helm)
1316
HELM_TARGET := dist/mrmat-python-api-fastapi-$(VERSION).tgz
@@ -31,7 +34,8 @@ container: $(PYTHON_TARGET) $(CONTAINER_SOURCES)
3134
-f var/container/Dockerfile \
3235
-t localhost:5001/mrmat-python-api-fastapi:$(VERSION) \
3336
--build-arg MRMAT_VERSION=$(VERSION) \
34-
.
37+
--build-arg WHEEL=$(PYTHON_TARGET) \
38+
$(ROOT_PATH)
3539
docker push localhost:5001/mrmat-python-api-fastapi:$(VERSION)
3640

3741
helm-install: $(HELM_TARGET)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
[![Build](https://github.com/MrMatOrg/mrmat-python-api-fastapi/actions/workflows/build.yml/badge.svg)](https://github.com/MrMatOrg/mrmat-python-api-fastapi/actions/workflows/build.yml)
44

55

6-
Boilerplate (and playground) for a code-first Python FastAPI API, with all the bells and whistles we've come to expect
6+
Boilerplate (and playground) for a code-first Python FastAPI API, with all the bells and whistles we've come to expect.
77

var/container/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM python:3.12-alpine AS build
22
ARG MRMAT_VERSION="0.0.0.dev0"
3-
ADD dist/mrmat_python_api_fastapi-*-py3-none-any.whl /
4-
RUN pip install --user /mrmat_python_api_fastapi-*-py3-none-any.whl
3+
ARG WHEEL=""
4+
ADD "$WHEEL" /
5+
RUN pip install --user /mrmat_python_api_fastapi-*.whl
56

67
FROM python:3.12-alpine
78
ARG MRMAT_VERSION="0.0.0.dev0"

var/helm/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ serviceAccount:
1111
pod:
1212
name: mrmat-python-api-fastapi
1313
replicas: 2
14-
repository: mrmat-registry:5000/mrmat-python-api-fastapi
14+
repository: registry:5000/mrmat-python-api-fastapi
1515
imagePullPolicy: IfNotPresent
1616
port: 8000
1717

0 commit comments

Comments
 (0)