Skip to content

Commit

Permalink
refactor: support python-core 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
whdalsrnt committed Nov 17, 2023
1 parent 7afe0bc commit 934d6d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM cloudforet/python-core:2.0

ENV PYTHONUNBUFFERED 1
ENV SPACEONE_PORT 50051
Expand All @@ -13,15 +13,11 @@ COPY pkg/*.txt ${PKG_DIR}/
RUN pip install --upgrade pip && \
pip install --upgrade -r ${PKG_DIR}/pip_requirements.txt

ARG CACHEBUST=1
RUN pip install --upgrade --pre spaceone-core spaceone-api

COPY src ${SRC_DIR}
WORKDIR ${SRC_DIR}
RUN python3 setup.py install && \
rm -rf /tmp/*
RUN python3 setup.py install && rm -rf /tmp/*

EXPOSE ${SPACEONE_PORT}

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

This file was deleted.

7 changes: 7 additions & 0 deletions src/cloudforet/plugin/interface/grpc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from spaceone.core.pygrpc.server import GRPCServer
from .collector import Collector

_all_ = ['app']

app = GRPCServer()
app.add_service(Collector)

0 comments on commit 934d6d4

Please sign in to comment.