-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
217 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
from plano import * | ||
|
||
image_tag = "quay.io/skupper/trade-zoo-frontend" | ||
|
||
@command | ||
def build(no_cache=False): | ||
no_cache_arg = "--no-cache" if no_cache else "" | ||
|
||
run(f"podman build {no_cache_arg} --format docker -t {image_tag} .") | ||
|
||
@command | ||
def run_(): | ||
run(f"podman run --net host {image_tag}") | ||
|
||
@command | ||
def debug(): | ||
run(f"podman run -it --net host --entrypoint /bin/sh {image_tag}") | ||
|
||
@command | ||
def push(): | ||
run("podman login quay.io") | ||
run(f"podman push {image_tag}") |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,37 @@ | ||
FROM registry.fedoraproject.org/fedora-minimal:36 | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
RUN microdnf -y install gcc librdkafka-devel python3-devel python3-pip && microdnf clean all | ||
FROM python:alpine AS build | ||
|
||
RUN pip install starlette sse_starlette confluent_kafka uvicorn | ||
RUN apk add --no-cache gcc librdkafka-dev musl-dev | ||
RUN pip install --no-cache-dir confluent-kafka starlette sse_starlette uvicorn | ||
|
||
COPY python /app/python | ||
COPY static /app/static | ||
FROM python:alpine AS run | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache librdkafka | ||
|
||
ENTRYPOINT ["python3", "python/main.py"] | ||
RUN adduser -S fritz -G root | ||
USER fritz | ||
|
||
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages | ||
COPY --chown=fritz:root python /home/fritz/python | ||
COPY --chown=fritz:root static /home/fritz/static | ||
|
||
WORKDIR /home/fritz | ||
ENTRYPOINT ["python", "python/main.py"] |
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,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
from plano import * | ||
|
||
image_tag = "quay.io/skupper/trade-zoo-market-data" | ||
|
||
@command | ||
def build(no_cache=False): | ||
no_cache_arg = "--no-cache" if no_cache else "" | ||
|
||
run(f"podman build {no_cache_arg} --format docker -t {image_tag} .") | ||
|
||
@command | ||
def run_(): | ||
run(f"podman run --net host {image_tag}") | ||
|
||
@command | ||
def debug(): | ||
run(f"podman run -it --net host --entrypoint /bin/sh {image_tag}") | ||
|
||
@command | ||
def push(): | ||
run("podman login quay.io") | ||
run(f"podman push {image_tag}") |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,36 @@ | ||
FROM registry.fedoraproject.org/fedora-minimal:36 | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
RUN microdnf -y install gcc librdkafka-devel python3-devel python3-pip && microdnf clean all | ||
FROM python:alpine AS build | ||
|
||
RUN pip install starlette sse_starlette confluent_kafka uvicorn | ||
RUN apk add --no-cache gcc librdkafka-dev musl-dev | ||
RUN pip install --no-cache-dir confluent-kafka | ||
|
||
COPY python /app/python | ||
FROM python:alpine AS run | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache librdkafka | ||
|
||
ENTRYPOINT ["python3", "python/main.py"] | ||
RUN adduser -S fritz -G root | ||
USER fritz | ||
|
||
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages | ||
COPY --chown=fritz:root python /home/fritz/python | ||
|
||
WORKDIR /home/fritz | ||
ENTRYPOINT ["python", "python/main.py"] |
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,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
from plano import * | ||
|
||
image_tag = "quay.io/skupper/trade-zoo-order-processor" | ||
|
||
@command | ||
def build(no_cache=False): | ||
no_cache_arg = "--no-cache" if no_cache else "" | ||
|
||
run(f"podman build {no_cache_arg} --format docker -t {image_tag} .") | ||
|
||
@command | ||
def run_(): | ||
run(f"podman run --net host {image_tag}") | ||
|
||
@command | ||
def debug(): | ||
run(f"podman run -it --net host --entrypoint /bin/sh {image_tag}") | ||
|
||
@command | ||
def push(): | ||
run("podman login quay.io") | ||
run(f"podman push {image_tag}") |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,36 @@ | ||
FROM registry.fedoraproject.org/fedora-minimal:36 | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
RUN microdnf -y install gcc librdkafka-devel python3-devel python3-pip && microdnf clean all | ||
FROM python:alpine AS build | ||
|
||
RUN pip install starlette sse_starlette confluent_kafka uvicorn | ||
RUN apk add --no-cache gcc librdkafka-dev musl-dev | ||
RUN pip install --no-cache-dir confluent-kafka | ||
|
||
COPY python /app/python | ||
FROM python:alpine AS run | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache librdkafka | ||
|
||
ENTRYPOINT ["python3", "python/main.py"] | ||
RUN adduser -S fritz -G root | ||
USER fritz | ||
|
||
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages | ||
COPY --chown=fritz:root python /home/fritz/python | ||
|
||
WORKDIR /home/fritz | ||
ENTRYPOINT ["python", "python/main.py"] |