Skip to content

Commit

Permalink
build: apply core 2.0 compatability
Browse files Browse the repository at this point in the history
Signed-off-by: Jongmin Kim <whdalsrnt@megazone.com>
  • Loading branch information
whdalsrnt committed Jun 12, 2024
1 parent d307d84 commit e90af6e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudforet/python-core:1
FROM cloudforet/python-core:2

ENV PYTHONUNBUFFERED 1
ENV CLOUDONE_PORT 50051
Expand All @@ -10,8 +10,7 @@ RUN apt update && apt upgrade -y

COPY pkg/*.txt ${PKG_DIR}/
RUN pip install --upgrade pip && \
pip install --upgrade --use-deprecated=legacy-resolver -r ${PKG_DIR}/pip_requirements.txt && \
pip install --upgrade spaceone-api
pip install --upgrade -r ${PKG_DIR}/pip_requirements.txt

COPY src ${SRC_DIR}

Expand All @@ -22,4 +21,4 @@ RUN python3 setup.py install && \
EXPOSE ${CLOUDONE_PORT}

ENTRYPOINT ["spaceone"]
CMD ["grpc", "cloudforet.cost_analysis"]
CMD ["run", "grpc-server", "cloudforet.cost_analysis"]
5 changes: 0 additions & 5 deletions src/cloudforet/cost_analysis/conf/proto_conf.py

This file was deleted.

11 changes: 11 additions & 0 deletions src/cloudforet/cost_analysis/interface/grpc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from spaceone.core.pygrpc.server import GRPCServer
from .cost import Cost
from .job import Job
from .data_source import DataSource

__all__ = ["app"]

app = GRPCServer()
app.add_service(DataSource)
app.add_service(Job)
app.add_service(Cost)
Empty file.

0 comments on commit e90af6e

Please sign in to comment.