-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Victor Chaptsev
committed
Sep 2, 2018
1 parent
8c5559b
commit 58fb3ed
Showing
97 changed files
with
1,498 additions
and
930 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<a href="https://travis-ci.org/vchaptsev/cookiecutter-django-vue"> | ||
<img src="https://travis-ci.org/vchaptsev/cookiecutter-django-vue.svg?branch=master" /> | ||
</a> | ||
|
||
Cookiecutter Django-Vue | ||
======================= | ||
|
||
|
@@ -8,17 +12,16 @@ inspired by [Cookiecutter Django](https://github.com/pydanny/cookiecutter-django | |
<img src="https://i.imgur.com/SA8cjs8.png" /> | ||
</p> | ||
|
||
|
||
Features | ||
-------- | ||
|
||
- [Docker](https://www.docker.com/) | ||
- [12 Factor](http://12factor.net/) | ||
<!-- - Server: [Caddy](https://caddyserver.com/) --> | ||
- Frontend: [Vue](https://vuejs.org/) + vue-cli | ||
- Server: [Nginx](https://nginx.org/) | ||
- Frontend: [Vue](https://vuejs.org/) + [vue-cli](https://cli.vuejs.org/) | ||
- Backend: [Django](https://www.djangoproject.com/) | ||
- Database: [PostgreSQL](https://www.postgresql.org/) | ||
<!-- - [pipenv](https://github.com/pypa/pipenv) for python-requirements --> | ||
- API: REST or GraphQL | ||
|
||
Optional Integrations | ||
--------------------- | ||
|
@@ -27,7 +30,9 @@ Optional Integrations | |
|
||
- Integration with [MailHog](https://github.com/mailhog/MailHog) for local email testing | ||
- Integration with [Sentry](https://sentry.io/welcome/) for frontend and backend errors logging | ||
- Integration with [Portainer](https://portainer.io/) (management UI for docker) | ||
- Integration with [Google Analytics](https://www.google.com/analytics/) or [Yandex Metrika](https://tech.yandex.ru/metrika/) for web-analytics | ||
- Automatic database backups | ||
|
||
Usage | ||
----- | ||
|
@@ -45,24 +50,33 @@ will be created for you. | |
|
||
Answer the prompts with your own desired options. For example: | ||
|
||
======================= GENERAL ====================== [ ]: | ||
======================== INFO ======================= [ ]: | ||
project_name [Project Name]: Website | ||
project_slug [website]: website | ||
description [Short description]: My awesome website | ||
author [Your Name]: Your Name | ||
email [<[email protected]>]: <[email protected]> | ||
======================= DEVOPS ======================= [ ]: | ||
====================== GENERAL ====================== [ ]: | ||
Select api: | ||
1 - REST | ||
2 - GraphQL | ||
Choose from 1, 2 [1]: 2 | ||
backups [y]: y | ||
==================== INTEGRATIONS =================== [ ]: | ||
use_sentry [y]: y | ||
======================= BACKEND ====================== [ ]: | ||
use_portainer [y]: y | ||
use_mailhog [y]: y | ||
custom_user [n]: n | ||
======================= FRONTEND ===================== [ ]: | ||
Select analytics: | ||
1 - Google Analytics | ||
2 - Yandex Metrika | ||
3 - None | ||
Choose from 1, 2, 3 [1]: 2 | ||
|
||
Project creation will cause some odd newlines and linter errors, so I'd recommend: | ||
|
||
$ autopep8 -r --in-place --aggressive --aggressive . | ||
$ npm run lint --fix | ||
|
||
Now you can start project with | ||
[docker-compose](https://docs.docker.com/compose/): | ||
|
||
|
@@ -72,3 +86,9 @@ For production you'll need to fill out `.env` file and use | |
`docker-compose-prod.yml` file: | ||
|
||
$ docker-compose -f docker-compose-prod.yml up --build -d | ||
|
||
|
||
Contributing | ||
------------ | ||
|
||
Help and feedback are welcome :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.py] | ||
indent_size = 4 | ||
max_line_length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
### OSX ### | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
### SublimeText ### | ||
# cache files for sublime text | ||
*.tmlanguage.cache | ||
*.tmPreferences.cache | ||
*.stTheme.cache | ||
|
||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# sftp configuration file | ||
sftp-config.json | ||
|
||
# Basics | ||
*.py[cod] | ||
__pycache__ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
pip-log.txt | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
htmlcov | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Webpack | ||
webpack-stats.json | ||
dist/ | ||
|
||
# Vim | ||
*~ | ||
*.swp | ||
*.swo | ||
|
||
# npm | ||
node_modules | ||
|
||
# Compass | ||
.sass-cache | ||
|
||
# User-uploaded media | ||
media/ | ||
|
||
# Collected staticfiles | ||
*/staticfiles/ | ||
|
||
.cache/ | ||
**/certs | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* | ||
|
||
# VS code | ||
.vscode | ||
.pythonconfig | ||
|
||
# Venv | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"request": { | ||
"url": "http://localhost:8000/graphql" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM python:3.6 | ||
|
||
# python envs | ||
ENV PYTHONFAULTHANDLER=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONHASHSEED=random \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 | ||
|
||
# python dependencies | ||
COPY ./requirements.txt / | ||
RUN pip install -r ./requirements.txt | ||
|
||
# upload scripts | ||
COPY ./scripts/entrypoint.sh ./scripts/start.sh ./scripts/gunicorn.sh / | ||
|
||
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
__version__ = '0.1.0' | ||
__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')]) | ||
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.