Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify run server command based on python-core 2.0 #68

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM cloudforet/python-core:2.0
ARG PACKAGE_VERSION
ARG BRANCH_NAME
ENV PYTHONUNBUFFERED 1
ENV SPACEONE_PORT 50051
ENV SPACEONE_PORT 8000
ENV SRC_DIR /tmp/src
ENV CONF_DIR /etc/spaceone
ENV LOG_DIR /var/log/spaceone
Expand All @@ -12,7 +12,8 @@ ENV PACKAGE_VERSION=$PACKAGE_VERSION

COPY pkg/pip_requirements.txt pip_requirements.txt

RUN pip install --upgrade -r pip_requirements.txt
RUN pip install --upgrade pip && \
pip install --upgrade -r pip_requirements.txt
RUN apt-get update && apt-get install -y git

RUN mkdir -p ${OPENAPI_JSON_DIR}
Expand All @@ -31,4 +32,4 @@ RUN pip install --upgrade spaceone-api
EXPOSE ${SPACEONE_PORT}

ENTRYPOINT ["spaceone"]
CMD ["rest", "cloudforet.console_api_v2", "-m", "/opt"]
CMD ["run", "rest-server", "cloudforet.console_api_v2", "-m", "/opt"]
2 changes: 1 addition & 1 deletion deploy/helm/templates/deployment-rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
resources:
{{- toYaml .Values.resources.rest | nindent 12 }}
{{- end }}
command: ['spaceone', 'rest', 'cloudforet.{{ regexReplaceAll "-" .Values.name "_" }}', '-p', '8000']
command: ['spaceone', 'run', 'rest-server', 'cloudforet.{{ regexReplaceAll "-" .Values.name "_" }}', '-p', '8000']
ports:
- containerPort: 8000
volumeMounts:
Expand Down
7 changes: 0 additions & 7 deletions src/cloudforet/console_api_v2/conf/router_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
'tags': ['console-api > api']
}
},
{
'router_path': 'cloudforet.console_api_v2.interface.rest.api:router',
'router_options': {
'prefix': '/api',
'tags': ['console-api > api']
}
},
# {
# 'router_path': 'cloudforet.console_api_v2.interface.rest.resource:router',
# 'router_options': {
Expand Down