Python backend for a Slack's kudos plugin.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: travis

seik fc2dee57 b161484a

+54 -3
+39
.travis.yml
··· 1 + os: linux 2 + dist: focal 3 + language: python 4 + python: 5 + - "3.10.0" 6 + env: 7 + global: 8 + - PROJECT_NAME=deko 9 + - PIP_CACHE_DIR=$HOME/.cache/pip 10 + jobs: 11 + include: 12 + - stage: test 13 + cache: 14 + - pip: true 15 + - directories: 16 + - $HOME/.cache/pypoetry 17 + install: 18 + - pip install poetry 19 + - poetry config virtualenvs.create false && poetry install -n --no-ansi 20 + script: 21 + - black --check app 22 + - isort app --profile black --check 23 + - mypy --ignore-missing-imports app 24 + - pytest app 25 + - stage: build and push 26 + if: branch IN (main, develop) 27 + services: 28 + - docker 29 + script: 30 + - IMAGE_ID=registry.dekaside.com/$PROJECT_NAME/$PROJECT_NAME 31 + - docker build . --tag $IMAGE_ID:latest 32 + - echo "$HARBOR_PASSWORD" | docker login registry.dekaside.com --username "$HARBOR_USERNAME" 33 + --password-stdin 34 + - docker push $IMAGE_ID:latest 35 + - stage: deploy staging 36 + if: branch = develop 37 + script: 38 + - curl -X POST $PORTAINER_HOOK 39 +
+1 -2
Dockerfile
··· 9 9 RUN rm -rf /pyproject.toml && rm -rf /poetry.lock 10 10 11 11 COPY ./app /app 12 - WORKDIR /app/ 13 12 14 13 EXPOSE 8000 15 14 16 - ENTRYPOINT [ "gunicorn", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:8000", "main:app" ] 15 + ENTRYPOINT [ "gunicorn", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:8000", "app.main:app" ]
+14 -1
Makefile
··· 1 - # Common commands to handle the project 1 + # Variables 2 + # ------------------------------------------------------------------------------ 3 + PROJECT_NAME=deko 4 + IMAGE_ID=registry.dekaside.com/${PROJECT_NAME}/${PROJECT_NAME} 5 + 6 + # Common commands to handle the project. 2 7 # ------------------------------------------------------------------------------ 3 8 check: 4 9 poetry run isort . --profile black --check-only ··· 8 13 format: 9 14 poetry run isort . --profile black 10 15 poetry run black . 16 + 17 + # Build and push docker latest image 18 + # ------------------------------------------------------------------------------ 19 + build: 20 + docker build . -f ./Dockerfile --tag ${IMAGE_ID}:latest 21 + 22 + push: build 23 + docker push ${IMAGE_ID}:latest