-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kamu-api-server
: error if specialized config is not found + `kamu-d…
…ev-api-server:` image (#149) * kamu-api-server:dev-$(TAG): introduce for debugging * kamu-api-server, load_config(): error if specialized config is not found * kamu-api-server:dev-$(TAG): use cross tool for building * RUSTSEC-2024-0376: fix * dev-api-server: use separate image for dev builds * images: add "kamu-" prefix * Cargo: fix yanked crate (url)
- Loading branch information
Showing
12 changed files
with
76 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG KAMU_VERSION | ||
FROM ghcr.io/kamu-data/kamu-base:${KAMU_VERSION} | ||
|
||
WORKDIR /opt/kamu | ||
|
||
COPY ./tmp/kamu-api-server /opt/kamu/ | ||
|
||
ENTRYPOINT ["/usr/bin/tini", "--"] | ||
|
||
CMD ["/opt/kamu/kamu-api-server", "run", "--address=0.0.0.0", "--http-port=8080"] | ||
|
||
EXPOSE 8080/tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
KAMU_VERSION=$(shell cargo metadata --format-version 1 | jq -r '.packages[] | select( .name == "kamu-core") | .version') | ||
IMAGE_REPO=ghcr.io/kamu-data | ||
IMAGE_NAME=kamu-dev-api-server | ||
TARGET=x86_64-unknown-linux-gnu | ||
# Branch name | ||
TAG=$(shell git rev-parse --abbrev-ref HEAD | sed 's/\//-/g') | ||
|
||
|
||
################################################################################ | ||
|
||
.PHONY: build | ||
build: | ||
# cargo binstall cross | ||
cd ../../ && RUSTFLAGS="" cross build -p kamu-api-server --release --target=$(TARGET) | ||
|
||
|
||
.PHONY: image | ||
image: build | ||
mkdir -p ./tmp | ||
cp ../../target/$(TARGET)/release/kamu-api-server tmp/kamu-api-server | ||
docker build \ | ||
--build-arg KAMU_VERSION=$(KAMU_VERSION) \ | ||
-t $(IMAGE_REPO)/$(IMAGE_NAME):$(TAG) \ | ||
. | ||
rm -rf ./tmp | ||
|
||
|
||
.PHONY: image-push | ||
image-push: | ||
docker push $(IMAGE_REPO)/$(IMAGE_NAME):$(TAG) | ||
|
||
################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
repo: | ||
repoUrl: file:///opt/kamu/workspace/.kamu/datasets | ||
datasetEnvVars: | ||
encryptionKey: i6boyWa8hYAuO5Fb2h64cOVy9eEusEkt |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters