Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7a9f84b
Add Uploadcare integration
Jan 28, 2019
c2259e6
Add vk gate support (#12)
vladimirshkoda Feb 4, 2019
3be2ece
Add OAuth and registration (#13)
b0g3r Feb 6, 2019
e15de6c
Add telegram gate. (#21)
vladimirshkoda Feb 13, 2019
7daf983
Add mypy requirement and define dev packages. (#22)
vladimirshkoda Feb 15, 2019
e9e93fb
[Security] Bump django from 2.1.5 to 2.1.7 (#29)
dependabot[bot] Feb 15, 2019
1141a7e
Publication endpoint filtering (#35)
b0g3r Feb 17, 2019
9a4c50b
Dockerize (#37)
Feb 17, 2019
81d716b
Update Travis deployment condition
Feb 17, 2019
9e7c32f
Bump redis from 3.1.0 to 3.2.0 (#39)
dependabot[bot] Feb 18, 2019
4637520
Fix Travis CI deployment (#43)
Feb 23, 2019
3e86b43
Fix allowed_host for deployment postpost.app (#45)
b0g3r Feb 23, 2019
6f83ad9
Move oauth, swagger and redoc to /api endpoint. (#46)
b0g3r Feb 23, 2019
db8f8b8
IO attachments (#40)
vladimirshkoda Feb 25, 2019
49178cd
Add docker-compose
Mar 2, 2019
573b17f
Replace sqlite with psql
Mar 2, 2019
0d8e189
Specify env file for celery container
Mar 9, 2019
b9e49ff
Bump drf-yasg from 1.13.0 to 1.14.0 (#53)
dependabot[bot] Mar 9, 2019
dc0f3a3
Add Sentry integration
Mar 9, 2019
c876f13
Replace Sentry DSN with an env variable
Mar 9, 2019
27b6805
[Security] Bump pyyaml from 3.13 to 5.1
dependabot-support Mar 13, 2019
c077e63
Fix links
patiencedaur Mar 16, 2019
1ca7602
Merge pull request #64 from piterpy-meetup/fix/readme
patiencedaur Mar 16, 2019
9feeaf3
Feature/18 multiple attachments (#60)
patiencedaur Mar 16, 2019
c6bc9a0
Feature/61 separate serializers (#62)
patiencedaur Mar 16, 2019
7b2356a
Bump redis from 3.2.0 to 3.2.1 (#65)
dependabot[bot] Mar 18, 2019
41d3dfe
Bump sentry-sdk from 0.7.6 to 0.7.7 (#67)
dependabot[bot] Mar 21, 2019
8c96f77
Bump celery from 4.2.1 to 4.2.2 (#66)
dependabot[bot] Mar 21, 2019
024c8b6
Feature/63 pre commit hook (#68)
patiencedaur Mar 22, 2019
9364835
Bump sentry-sdk from 0.7.7 to 0.7.9
dependabot-support Mar 30, 2019
8702d23
Bump drf-yasg from 1.14.0 to 1.15.0
dependabot-support Apr 1, 2019
3db98dd
Bump celery from 4.2.2 to 4.3.0
dependabot-support Apr 1, 2019
45bcd25
Bump pre-commit from 1.14.4 to 1.15.0
dependabot-support Apr 1, 2019
c2393a8
Feature/58 environment vars (#79)
patiencedaur Apr 7, 2019
8dd9f16
Bump django from 2.1.7 to 2.2 (#75)
dependabot[bot] Apr 7, 2019
2d677de
Bump mypy from 0.670 to 0.700 (#77)
dependabot[bot] Apr 7, 2019
35230f6
Bump psycopg2-binary from 2.8.1 to 2.8.2
dependabot-support Apr 15, 2019
4e4a79b
[Security] Bump urllib3 from 1.24.1 to 1.24.2
dependabot-support Apr 19, 2019
9b7befa
Bump mypy from 0.700 to 0.701
dependabot-support Apr 17, 2019
a054682
Bump pre-commit from 1.15.1 to 1.15.2
dependabot-support Apr 20, 2019
1e03a75
Bump sentry-sdk from 0.7.10 to 0.7.11
dependabot-support Apr 24, 2019
d5c66d7
Bump sentry-sdk from 0.7.11 to 0.7.12
dependabot-support Apr 26, 2019
a0b7f3b
Bump sentry-sdk from 0.7.12 to 0.7.14
dependabot-support Apr 30, 2019
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: 7 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Upload attachments to the CDN
UPLOADCARE_PUBLIC_KEY
UPLOADCARE_SECRET

# Sentry
SENTRY_ENVIRONMENT
SENTRY_DSN
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ venv.bak/
# mypy
.mypy_cache/

.idea
.idea

# Local
mydatabase
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---

- repo: local
hooks:
- id: isort
name: isort
entry: 'pipenv run isort'
language: system
- id: flake8
name: flake8
entry: 'pipenv run flake8'
pass_filenames: false
language: system
- id: mypy
name: mypy
entry: 'pipenv run mypy .'
types: [python]
pass_filenames: false
language: system
21 changes: 20 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@ language: python
python:
- '3.6'
cache: pip

services:
- docker

install:
- 'pip install pipenv'
- 'pipenv sync'
- 'pipenv sync --dev'

script:
- 'pipenv run flake8'
- 'pipenv run mypy .'

before_deploy:
- echo $REGISTRY_PASS | docker login -u "$REGISTRY_USER" --password-stdin
- export IMAGE_TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "dev"; fi`
- export IMAGE_NAME="piterpy/postpost"
- docker build -t $IMAGE_NAME:$IMAGE_TAG .

deploy:
provider: script
script: docker push $IMAGE_NAME:$IMAGE_TAG
on:
condition: $TRAVIS_BRANCH =~ ^master|develop$
all_branches: true
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.6-alpine

ENV PYTHONPATH=/app/postpost \
DJANGO_SETTINGS_MODULE=main.settings \
PYTHONUNBUFFERED=1 \
PYTHONFAULTHANDLER=1 \
PIP_NO_CACHE_DIR=off

RUN apk --no-cache add gcc build-base linux-headers jpeg-dev zlib-dev postgresql-dev musl-dev && \
pip install pipenv

WORKDIR /app
COPY Pipfile Pipfile.lock /app/
RUN pipenv sync

COPY . /app

CMD sh /app/run-app.sh
17 changes: 15 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ url = "https://pypi.python.org/simple"
verify_ssl = true

[dev-packages]
wemake-python-styleguide = "==0.7.1"
# see https://github.com/wemake-services/wemake-python-styleguide/pull/472#issuecomment-460057878
flake8 = '==3.6.0'
mypy = "==0.701"
pre-commit = "*"
python-decouple = "*"

[packages]
django = "==2.1.5"
wemake-python-styleguide = "==0.6.3"
django = "==2.2"
django-rest-framework = "*"
pillow = "*"
drf-writable-nested = "*"
Expand All @@ -15,6 +20,14 @@ redis = "*"
requests = "*"
drf-yasg = "*"
djangorestframework-camel-case = "*"
django-oauth-toolkit = "*"
django-cors-middleware = "*"
pyuploadcare = "*"
django-filter = "*"
uwsgi = "*"
typing-extensions = "*"
psycopg2-binary = "*"
sentry-sdk = "*"

[requires]
python_version = "3.6"
Loading