Skip to content

Commit

Permalink
Merge pull request #52 from Ilhasoft/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
dyohan9 authored Sep 3, 2021
2 parents 50681eb + e8ac9d5 commit d4e4798
Show file tree
Hide file tree
Showing 27 changed files with 855 additions and 691 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,4 @@ dmypy.json
staticfiles/

# gRPC
weni/protos/inteligence/*.py
weni/protos/flow/
weni/protos/weni/*.py
weni/protos/
18 changes: 4 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ WORKDIR $WORKDIR
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y apt-utils \
&& apt-get install --no-install-recommends --no-install-suggests -y gcc bzip2 git curl nginx libpq-dev gettext \
libgdal-dev python3-cffi python3-gdal vim
libgdal-dev python3-cffi python3-gdal vim build-essential

RUN pip install -U pip==20.2.2 setuptools==49.6.0
RUN pip install pipenv==2018.11.26
RUN pip install -U pip==21.2.2 setuptools==57.4.0
RUN pip install pipenv==2021.5.29
RUN pip install gunicorn==19.9.0
RUN pip install gevent==1.4.0
RUN pip install psycopg2-binary
Expand All @@ -23,17 +23,7 @@ RUN pipenv install --system

COPY . .

RUN git clone https://github.com/Ilhasoft/weni-protobuffers weni/protos/flow/
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/inteligence/authentication.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/inteligence/organization.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/inteligence/repository.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_billing/billing.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_classifier/classifier.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_flow/flow.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_org/org.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_statistic/statistic.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_user/user.proto
RUN python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/weni/project.proto
RUN make createproto

RUN chmod +x ./entrypoint.sh
ENTRYPOINT [ "./entrypoint.sh" ]
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ CHECK_ENVIRONMENT := true
# Commands

createproto:
@rm -rf ./weni/protos/inteligence/*.py
@rm -rf ./weni/protos/flow
@git clone https://github.com/Ilhasoft/weni-protobuffers weni/protos/flow/
@rm -rf ./weni/protos/
@git clone --depth 1 --branch v1.0.1 https://github.com/Ilhasoft/weni-protobuffers ./weni/protos/
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/inteligence/authentication.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/inteligence/organization.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/inteligence/repository.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_billing/billing.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_classifier/classifier.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_flow/flow.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_org/org.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_statistic/statistic.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/rapidpro_user/user.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/weni/project.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/billing.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/classifier.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/flow.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/org.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/statistic.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/flow/user.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./weni/protos/connect/project.proto
44 changes: 22 additions & 22 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
flake8 = "~=3.8.4"
black = "==20.8b1"
coverage = "~=5.3"
flake8 = "~=3.9.2"
black = "==21.7b0"
coverage = "~=5.5"

[packages]
django = "~=2.2.17"
djangorestframework = "~=3.12.2"
django = "~=3.2.6"
djangorestframework = "~=3.12.4"
drf-yasg2 = "~=1.19.4"
django-environ = "~=0.4.5"
mozilla-django-oidc = "~=1.2.4"
django-environ-2 = "~=2.1.0"
mozilla-django-oidc = "~=2.0.0"
django-filter = "~=2.4.0"
celery = "~=4.4.0"
django-celery-results = "~=1.1.2"
celery = "~=5.1.2"
django-celery-results = "~=2.2.0"
redis = "~=3.5.3"
django-celery-beat = "~=2.1.0"
psycopg2-binary = "~=2.7.7"
python-keycloak = "~=0.24.0"
boto3 = "~=1.16.44"
django-celery-beat = "~=2.2.1"
psycopg2-binary = "~=2.9.1"
python-keycloak = "~=0.25.0"
boto3 = "~=1.18.13"
django-storages = "~=1.11.1"
pillow = "~=8.0.1"
pillow = "~=8.3.1"
filetype = "~=1.0.7"
django-cors-headers = "~=3.6.0"
whitenoise = "~=5.2.0"
sentry-sdk = "~=0.13.2"
elastic-apm = "~=5.9.0"
django-timezone-field = "~=4.1.1"
grpcio = "~=1.34.0"
grpcio-tools = "~=1.34.0"
djangogrpcframework = "~=0.2"
django-cors-headers = "~=3.7.0"
whitenoise = "~=5.3.0"
sentry-sdk = "~=1.3.1"
elastic-apm = "~=6.3.3"
django-timezone-field = "~=4.2.1"
grpcio = "~=1.39.0"
grpcio-tools = "~=1.39.0"
djangogrpcframework = "~=0.2.1"

[requires]
python_version = "3.6"
Loading

0 comments on commit d4e4798

Please sign in to comment.