-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit a03d5c4
Showing
22 changed files
with
1,051 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.venv | ||
db.sqlite3 | ||
media | ||
node_modules | ||
local.py | ||
reset_import.sh |
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,23 @@ | ||
FROM python:3.7-slim | ||
LABEL maintainer="[email protected]" | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PIPENV_VENV_IN_PROJECT 1 | ||
EXPOSE 8000 | ||
|
||
RUN apt-get update | ||
RUN apt-get install libglib2.0-0 -y | ||
RUN pip3 install pipenv | ||
COPY . /app/ | ||
WORKDIR /app/ | ||
|
||
RUN set -ex && \ | ||
pipenv sync && \ | ||
useradd wagtail && \ | ||
chown -R wagtail /app | ||
|
||
USER wagtail | ||
|
||
CMD pipenv run ./manage.py collectstatic --noinput --settings=decruck.settings.production && \ | ||
pipenv run ./manage.py migrate --settings=decruck.settings.production && \ | ||
pipenv run gunicorn --bind 0.0.0.0:8000 --workers 3 --forwarded-allow-ips="*" decruck.wsgi:application |
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,48 @@ | ||
PY_SENTINAL = .venv/sentinal | ||
JS_SENTINAL = node_modules/sentinal | ||
PIPFILE = Pipfile | ||
|
||
$(PY_SENTINAL): $(PIPFILE) | ||
-rm -rf .venv | ||
pipenv sync | ||
touch $@ | ||
|
||
$(JS_SENTINAL): | ||
-rm -rf node_modules | ||
npm install | ||
touch $@ | ||
|
||
clean: | ||
-rm -rf .venv node_modules | ||
|
||
runserver: $(PY_SENTINAL) | ||
pipenv run ./manage.py runserver | ||
|
||
migrate: $(PY_SENTINAL) | ||
pipenv run ./manage.py migrate | ||
|
||
makemigrations: $(PY_SENTINAL) | ||
pipenv run ./manage.py makemigrations | ||
|
||
superuser: $(PY_SENTINAL) | ||
pipenv run ./manage.py createsuperuser | ||
|
||
shell: $(PY_SENTINAL) | ||
pipenv run ./manage.py shell | ||
|
||
test: $(PY_SENTINAL) | ||
pipenv run ./manage.py test | ||
|
||
scss: $(JS_SENTINAL) | ||
npm run watch-scss | ||
|
||
docker-image: | ||
docker build -t nbuonin/decruck:`git log -n 1 --pretty="%h"` . | ||
|
||
docker-test: | ||
cd docker && docker-compose up --build --abort-on-container-exit | ||
|
||
docker-push: | ||
docker push nbuonin/decruck:`git log -n 1 --pretty="%h"` | ||
|
||
.PHONY: clean runserver migrate makemigrations superuser shell test scss docker-image docker-test docker-push |
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,29 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
wagtail = "==2.6.1" | ||
wagtail-autocomplete = "==0.3.1" | ||
faker = "==2.0.1" | ||
factory-boy = "==2.12.0" | ||
wagtail-factories = "==2.0.0" | ||
gunicorn = "==19.9.0" | ||
django-el-pagination = "==3.2.4" | ||
wagtailmenus = "==2.13.1" | ||
psycopg2-binary = "==2.8.3" | ||
django-paypal = "==1.0.0" | ||
django-storages = "==1.7.1" | ||
boto3 = "==1.9.199" | ||
opencv-python-headless = "==4.1.0.25" | ||
pylint = "==2.3.1" | ||
flake8 = "==3.7.8" | ||
pylint-django = "==2.0.11" | ||
wagtail-metadata = "==2.0.1" | ||
sentry-sdk = "==0.11.1" | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3.7" |
Oops, something went wrong.