Compare commits
145
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
915143a3fc | ||
|
|
c90df1c762 | ||
|
|
d21e2fadf5 | ||
|
|
368a74a1c7 | ||
|
|
c1ba069b41 | ||
|
|
0271e71974 | ||
|
|
d209ad28c5 | ||
|
|
9f5de228b5 | ||
|
|
92871ae135 | ||
|
|
a702e9f516 | ||
|
|
9bbde03fbd | ||
|
|
c0dc586058 | ||
|
|
ddd7c04e12 | ||
|
|
f220c5b596 | ||
|
|
1eafde9735 | ||
|
|
96433c7f41 | ||
|
|
6ddcf0380b | ||
|
|
ff8f5b64db | ||
|
|
00e5f58014 | ||
|
|
2a5635039b | ||
|
|
282bb58bc3 | ||
|
|
1f25080a36 | ||
|
|
33c828fd99 | ||
|
|
6ae02e1bcb | ||
|
|
e8a3f845f1 | ||
|
|
75629e9fe5 | ||
|
|
68d3df2af7 | ||
|
|
14f804c0ad | ||
|
|
0709a971dd | ||
|
|
1b9c936e00 | ||
|
|
d1ae6957a2 | ||
|
|
ce9ada5b2b | ||
|
|
dcc7837940 | ||
|
|
79eef3adad | ||
|
|
403067a728 | ||
|
|
b6ec49e108 | ||
|
|
83e1b50151 | ||
|
|
a6f119b6c0 | ||
|
|
735450f4b0 | ||
|
|
03a587bec9 | ||
|
|
41f53d1ae2 | ||
|
|
49d360a942 | ||
|
|
1983e73e14 | ||
|
|
d82992c8a1 | ||
|
|
151a44f366 | ||
|
|
f4c572a8a2 | ||
|
|
351f04c859 | ||
|
|
db9ca12b4c | ||
|
|
b3ddaae5f2 | ||
|
|
2c69c495fc | ||
|
|
defde3ff28 | ||
|
|
512c19746d | ||
|
|
2d9af7b785 | ||
|
|
4c669d624d | ||
|
|
32bee56dad | ||
|
|
80391aa894 | ||
|
|
345312a259 | ||
|
|
889914403c | ||
|
|
12297520da | ||
|
|
2b57f624c5 | ||
|
|
f8380267df | ||
|
|
451ccd8a7d | ||
|
|
ff569bee10 | ||
|
|
bded141624 | ||
|
|
552b5d3afe | ||
|
|
2989138fac | ||
|
|
fca1b6dfab | ||
|
|
b06cf4b749 | ||
|
|
d34ca52c4d | ||
|
|
09c83fa203 | ||
|
|
41ebca2bb9 | ||
|
|
bce91cc538 | ||
|
|
41f5518faa | ||
|
|
a3baef397b | ||
|
|
df3c691847 | ||
|
|
5a0a585389 | ||
|
|
82232f74ec | ||
|
|
52856ca529 | ||
|
|
781c8db3d3 | ||
|
|
f0a115b1c5 | ||
|
|
fd225cd372 | ||
|
|
3a94f97e92 | ||
|
|
fadbe2feb9 | ||
|
|
4a6a2cc2bd | ||
|
|
24ca19756f | ||
|
|
3c9a0b8d57 | ||
|
|
7b5ed373e2 | ||
|
|
b2493a8b1f | ||
|
|
8fafb18fcc | ||
|
|
c620ee05f2 | ||
|
|
f1bc97fb5d | ||
|
|
f02fde398a | ||
|
|
b620f75ccc | ||
|
|
a97a622595 | ||
|
|
937c087b1e | ||
|
|
c92fc99dee | ||
|
|
10769c634f | ||
|
|
8a1579b966 | ||
|
|
9cd2391a21 | ||
|
|
db9dd94055 | ||
|
|
6e1f752655 | ||
|
|
5ce132a6f2 | ||
|
|
06755ce98f | ||
|
|
cc8ecb3cb2 | ||
|
|
68a7fbde07 | ||
|
|
1d89673a92 | ||
|
|
dc4ffff6cb | ||
|
|
d9b704b522 | ||
|
|
311fa257e8 | ||
|
|
bacb20b160 | ||
|
|
3ae4d01239 | ||
|
|
54e916c665 | ||
|
|
c4ff09e93f | ||
|
|
e6446c7638 | ||
|
|
1334e12f74 | ||
|
|
f14b1879cf | ||
|
|
4608d5d304 | ||
|
|
752264aac2 | ||
|
|
72b2039221 | ||
|
|
b5fe6f2607 | ||
|
|
f7f978e1d0 | ||
|
|
c48bef25bd | ||
|
|
0eed827580 | ||
|
|
c15f6feb47 | ||
|
|
04350a89ee | ||
|
|
a92b86ac05 | ||
|
|
4ab52902f0 | ||
|
|
b4a94f2890 | ||
|
|
507fe0c52c | ||
|
|
7848103e38 | ||
|
|
8a12afb8ca | ||
|
|
bb91932435 | ||
|
|
ca02f288aa | ||
|
|
351fd1664b | ||
|
|
22db838497 | ||
|
|
55980d9286 | ||
|
|
2c95c2d582 | ||
|
|
6333cea237 | ||
|
|
ddd51b468e | ||
|
|
c442790e2c | ||
|
|
a4ab372b4b | ||
|
|
891ad298f3 | ||
|
|
e19d37fbc6 | ||
|
|
b2d785c4be | ||
|
|
281c1bf8f1 |
@@ -1,7 +1,21 @@
|
||||
Dockerfile
|
||||
Procfile
|
||||
run.sh
|
||||
runtime.txt
|
||||
Makefile
|
||||
heroku.yml
|
||||
docker-compose.yml
|
||||
dev.yml
|
||||
db.sqlite3
|
||||
venv
|
||||
.env
|
||||
.github/
|
||||
.git
|
||||
.vim/
|
||||
.buildpacks
|
||||
*.pem
|
||||
*.crt
|
||||
.travis.yml
|
||||
.gitignore
|
||||
.dockerignore
|
||||
requirements.txt
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
patreon: marcpartensky
|
||||
github: marcpartensky
|
||||
custom:
|
||||
# - monero:43J2XmRtjDPRLD35UsYGH2AZamFBQz7dt4VdvZXVm3SuadTrvcoXUXBRUNHqukFte23Q5TWXqhbwaLJJgoVQzzbe2AJDANQ
|
||||
- https://paypal.me/marcpartensky
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '45 22 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript', 'python' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -0,0 +1,41 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: website
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
tags: marcpartensky/website:latest
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag marcpartensky/website:$(date +%s)
|
||||
@@ -1,76 +0,0 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
# Publish `master` as Docker `latest` image.
|
||||
branches:
|
||||
- master
|
||||
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
# TODO: Change variable to your image's name.
|
||||
IMAGE_NAME: marcpartensky/website
|
||||
|
||||
jobs:
|
||||
# Run tests.
|
||||
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
if [ -f docker-compose.test.yml ]; then
|
||||
docker-compose --file docker-compose.test.yml build
|
||||
docker-compose --file docker-compose.test.yml run sut
|
||||
else
|
||||
docker build . --file Dockerfile
|
||||
fi
|
||||
|
||||
# Push image to GitHub Packages.
|
||||
# See also https://docs.docker.com/docker-hub/builds/
|
||||
push:
|
||||
# Ensure test job passes before pushing image.
|
||||
needs: test
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build image
|
||||
run: docker build . --file Dockerfile --tag $IMAGE_NAME
|
||||
|
||||
- name: Log into registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Push image
|
||||
run: |
|
||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
|
||||
|
||||
# Change all uppercase to lowercase
|
||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# Strip git ref prefix from version
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
|
||||
# Strip "v" prefix from tag name
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
|
||||
# Use Docker `latest` tag convention
|
||||
[ "$VERSION" == "master" ] && VERSION=latest
|
||||
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
@@ -0,0 +1,57 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: website
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install make
|
||||
run: sudo apt install make -y
|
||||
- name: Install Python3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
architecture: x64
|
||||
- name: make init
|
||||
run: make init
|
||||
- name: make update
|
||||
run: make update
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Build and push
|
||||
id: build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: false
|
||||
tags: marcpartensky/website:latest
|
||||
- name: Compose up
|
||||
run: docker-compose -f dev.yml up -d website postgres mysql
|
||||
- name: Test
|
||||
run: docker-compose run test
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
id: push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: marcpartensky/website:latest
|
||||
@@ -1,36 +0,0 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Python application
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8 pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest
|
||||
@@ -49,3 +49,6 @@ nohup.out
|
||||
|
||||
# Staticfiles
|
||||
staticfiles
|
||||
|
||||
# selenium
|
||||
geckodriver.log
|
||||
|
||||
+29
-21
@@ -1,15 +1,30 @@
|
||||
FROM python:3.7.7
|
||||
|
||||
FROM python:3.7.12-alpine as builder
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update
|
||||
RUN apk update
|
||||
RUN apk add curl npm
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_15.x | bash
|
||||
RUN apt-get install -y nodejs
|
||||
RUN npm install -g npm@latest
|
||||
RUN pip install pipenv
|
||||
RUN pipenv update
|
||||
RUN npm install
|
||||
|
||||
FROM python:3.7.12-alpine
|
||||
# ARG timestamp
|
||||
# ARG commit
|
||||
LABEL maintainer="marc.partensky@gmail.com"
|
||||
LABEL image="https://hub.docker.com/r/marcpartensky/website"
|
||||
LABEL source="https://github.com/marcpartensky/website"
|
||||
LABEL link="https://marcpartensky.com"
|
||||
# LABEL build.timestamp=timestamp
|
||||
# LABEL build.commit=commit
|
||||
|
||||
COPY --from=builder . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk update
|
||||
RUN apk add curl npm
|
||||
|
||||
# No .pyo and easier debugging
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
@@ -17,23 +32,16 @@ ENV PYTHONUNBUFFERED 1
|
||||
RUN pip install -U pip
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Needed to collectstatic
|
||||
ENV SECRET_KEY secret
|
||||
RUN ./manage.py collectstatic --noinput
|
||||
|
||||
RUN ./run.sh
|
||||
|
||||
ENV PORT 80
|
||||
|
||||
HEALTHCHECK --interval=5s \
|
||||
--timeout=5s \
|
||||
CMD curl -f http://127.0.0.1:$PORT || exit 1
|
||||
|
||||
# EXPOSE 443
|
||||
ENV HOST 0.0.0.0
|
||||
EXPOSE 80
|
||||
# EXPOSE 443
|
||||
|
||||
ENTRYPOINT run.sh
|
||||
HEALTHCHECK --interval=30s \
|
||||
--timeout=10s \
|
||||
--start-period=1m \
|
||||
--retries=3 \
|
||||
CMD curl -sSf http://127.0.0.1:$PORT/live || exit 1
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
# ENTRYPOINT ["daphne", "-e", "ssl:443:privateKey=$KEY:certKey=$CERT", "django_project.asgi:application"]
|
||||
|
||||
# ENTRYPOINT ["daphne", "django_project.asgi:application", "--port", "80", "--bind", "website", "-v2"]
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -1,32 +1,69 @@
|
||||
init:
|
||||
pip install pipenv
|
||||
# HOST=localhost
|
||||
# PORT=8000
|
||||
PRODUCTION=false
|
||||
|
||||
.PHONY: start list build push setup update init test up down migrate brewstart brewstop dev prod clean deploy
|
||||
|
||||
start:
|
||||
pipenv run ./entrypoint.sh --nosetup
|
||||
list:
|
||||
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
||||
build: update
|
||||
docker-compose -f dev.yml build website
|
||||
push: build
|
||||
git pushall
|
||||
docker-compose -f dev.yml push website
|
||||
setup: init update start
|
||||
update:
|
||||
npm update
|
||||
npm audit fix || echo npm audit fix failed
|
||||
# pipenv lock --pre --clear
|
||||
pipenv update
|
||||
pipenv lock -r > requirements.txt
|
||||
SECRET_KEY=secret pipenv run ./manage.py collectstatic --noinput
|
||||
SECRET_KEY=secret pipenv run ./manage.py makemigrations
|
||||
init: .env
|
||||
pip install --user pipenv
|
||||
pipenv install --dev
|
||||
npm install --save
|
||||
update:
|
||||
pipenv lock --pre --clear
|
||||
npm update
|
||||
activate:
|
||||
pipenv shell
|
||||
deactivate:
|
||||
exit
|
||||
build:
|
||||
docker build . -t marcpartensky/website
|
||||
push:
|
||||
docker push marcpartensky/website
|
||||
git pushall
|
||||
up:
|
||||
test:
|
||||
pipenv run ./manage.py test
|
||||
runtest:
|
||||
make start &
|
||||
make test
|
||||
make kill
|
||||
kill:
|
||||
pipenv run ./entrypoint.sh kill
|
||||
up: init
|
||||
docker-compose up -d
|
||||
down:
|
||||
docker-compose down
|
||||
run:
|
||||
pipenv run ./manage.py runserver 0.0.0.0:8000
|
||||
migrations:
|
||||
pipenv run ./manage.py makemigrations
|
||||
migrate:
|
||||
docker-compose -f dev.yml down
|
||||
docker-compose -f docker-compose.yml down
|
||||
DOCKER_HOST=ssh://vps docker-compose -f dev.ym up -d --build --force-recreate --remove-orphans website-test
|
||||
migrate: update
|
||||
pipenv run ./manage.py migrate
|
||||
shell:
|
||||
pipenv run ./manage.py shell
|
||||
test:
|
||||
pipenv run ./manage.py runserver 0.0.0.0:8000 &
|
||||
curl localhost:8000
|
||||
kill %
|
||||
brewstart:
|
||||
brew services start mysql
|
||||
brew services start redis
|
||||
brewstop:
|
||||
brew services stop mysql
|
||||
brew services stop redis
|
||||
dev:
|
||||
docker-compose -f dev.yml up -d --build --remove-orphans
|
||||
exec docker-compose -f dev.yml logs -f
|
||||
prod:
|
||||
docker-compose -f docker-compose.yml up -d --build --remove-orphans
|
||||
clean:
|
||||
docker-compose -f docker-compose.yml down
|
||||
docker-compose -f dev.yml down
|
||||
testdeploy:
|
||||
DOCKER_HOST=ssh://vps docker-compose -f dev.yml up -d --build --force-recreate --remove-orphans website-test
|
||||
DOCKER_HOST=ssh://vps docker-compose -f docker-compose.dev.ym logs -f website-test
|
||||
deploy: push
|
||||
DOCKER_HOST=ssh://vps docker service update vps_website
|
||||
.env:
|
||||
echo HOST=localhost > .env
|
||||
echo PORT=8000 >> .env
|
||||
echo PRODUCTION=false >> .env
|
||||
echo NOSETUP=true >> .env
|
||||
echo SECRET=$$(date +%s | sha256sum | base64 | head -c 32 && echo) >> .env
|
||||
|
||||
@@ -98,7 +98,6 @@ pipdeptree = "*"
|
||||
pipupgrade = "*"
|
||||
priority = "*"
|
||||
prompt-toolkit = "*"
|
||||
psycopg2= "*"
|
||||
psycopg2-binary = "*"
|
||||
ptyprocess = "*"
|
||||
pyasn1 = "*"
|
||||
@@ -153,9 +152,13 @@ SecretStorage = "*"
|
||||
service_identity = "*"
|
||||
Twisted = "*"
|
||||
django-robots = "*"
|
||||
selenium = "*"
|
||||
geckodriver-autoinstaller = "*"
|
||||
|
||||
[dev-packages]
|
||||
black = "*"
|
||||
jedi = "*"
|
||||
pylint = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.7.7"
|
||||
python_version = "3.7.12"
|
||||
|
||||
Generated
+1300
-806
File diff suppressed because it is too large
Load Diff
@@ -1,35 +1,31 @@
|
||||
author: Marc Partensky
|
||||
name: Website of Marc Partensky
|
||||
date: 8/10/2019
|
||||
---
|
||||
|
||||
[](https://github.com/MarcPartensky/Website)
|
||||
[](https://github.com/MarcPartensky/Website/actions/workflows/docker-push.yml)
|
||||
[](https://github.com/MarcPartensky/Website/actions/workflows/codeql-analysis.yml)
|
||||
|
||||
# Website
|
||||
|
||||
This is the code of my personal website.
|
||||
[https://marcpartensky.com/](https://marcpartensky.com/)
|
||||
|
||||
[](https://marcpartensky.com)
|
||||
|
||||
|
||||
## Light theme
|
||||
[](https://websiteofmarcpartensky.herokuapp.com)
|
||||
[](https://marcpartensky.com)
|
||||
|
||||
## Dark theme
|
||||
[](https://websiteofmarcpartensky.herokuapp.com?theme=dark)
|
||||
[](https://marcpartensky.com?theme=dark)
|
||||
|
||||
## Install
|
||||
|
||||
### From [source](https://github.com/MarcPartensky/Website) (requires [git](https://git-scm.com/), [python](https://www.python.org/), [pip](https://pip.pypa.io/en/stable/installing/))
|
||||
```sh
|
||||
git clone https://github.com/marcpartensky/website
|
||||
```
|
||||
cd website
|
||||
|
||||
```sh
|
||||
pip install -r requirements.txt
|
||||
# or with pipenv (recommended, install pipenv with pip install pipenv)
|
||||
pipenv install
|
||||
```
|
||||
|
||||
```sh
|
||||
./manage.py runserver
|
||||
```
|
||||
|
||||
@@ -41,9 +37,8 @@ pipenv install
|
||||
```sh
|
||||
docker run -it \
|
||||
-e SECRET_KEY=$(openssl rand -base64 32) \
|
||||
-p 80:80 \
|
||||
-p 8080:80 \
|
||||
marcpartensky/website
|
||||
./manage.py runserver
|
||||
```
|
||||
|
||||
#### or run with ssl certificate
|
||||
@@ -52,7 +47,7 @@ docker run -it \
|
||||
-env CERT \ # You must export a ssl certificate path
|
||||
-env KEY \ # You must export a pem key path
|
||||
-e SECRET_KEY=$(openssl rand -base64 32) \
|
||||
-p 443:443 \
|
||||
-p 8443:443 \
|
||||
marcpartensky/website
|
||||
```
|
||||
|
||||
@@ -63,10 +58,6 @@ cd website
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
> If you’re using Docker natively on Linux, Docker Desktop for Mac, or Docker Desktop for Windows, then the web app should now be listening on port 443 on your Docker daemon host. Point your web browser to http://localhost:443 to find the Hello World message. If this doesn’t resolve, you can also try http://127.0.0.1:443.
|
||||
|
||||
From https://docs.docker.com/compose/gettingstarted/
|
||||
|
||||
## Build the docker image from source
|
||||
```sh
|
||||
docker build . -t marcpartensky/website
|
||||
@@ -77,7 +68,11 @@ Build usually last 5 minutes.
|
||||

|
||||
**Scan to add me as a contact**
|
||||
|
||||
## Bonus
|
||||
# Bonus
|
||||
|
||||
## Notes
|
||||
author: Marc Partensky
|
||||
created: 8/10/2019
|
||||
|
||||
## Heroku Buildpacks
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
from django.contrib import admin
|
||||
from .models import MarkdownModel
|
||||
from .models import MarkdownModel, NotificationModel, DataModel
|
||||
|
||||
# Register your models here.
|
||||
admin.site.register(MarkdownModel)
|
||||
admin.site.register(NotificationModel)
|
||||
admin.site.register(DataModel)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.1.7 on 2021-10-25 16:10
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='NotificationModel',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('message', models.TextField()),
|
||||
('source', models.GenericIPAddressField()),
|
||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||
('seen', models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.2.11 on 2022-01-30 15:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0002_notificationmodel'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='DataModel',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('content', models.JSONField()),
|
||||
('source', models.GenericIPAddressField()),
|
||||
('view_count', models.PositiveIntegerField(default=0)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -17,3 +17,25 @@ class MarkdownModel(models.Model):
|
||||
# print('saving model somewhere')
|
||||
# print(args, kwargs)
|
||||
# return super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class NotificationModel(models.Model):
|
||||
"""A model that represents a notification."""
|
||||
|
||||
message = models.TextField()
|
||||
source = models.GenericIPAddressField()
|
||||
timestamp = models.DateTimeField(auto_now_add=True)
|
||||
seen = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
"""Return the notification sent."""
|
||||
return f"{self.message}"
|
||||
|
||||
|
||||
class DataModel(models.Model):
|
||||
"""A model that represents data sent by either POST or GET requests."""
|
||||
|
||||
content = models.JSONField()
|
||||
source = models.GenericIPAddressField()
|
||||
view_count = models.PositiveIntegerField(default=0)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
@@ -19,4 +19,6 @@ urlpatterns = [
|
||||
path("todo/<str:id>", views.todo, name="api-todo"),
|
||||
path("port/<int:n>", views.port, name="port"),
|
||||
path("port", views.port, name="port"),
|
||||
path("store", views.store, name="store"),
|
||||
path("store/<int:id>", views.read_store, name="read-store"),
|
||||
]
|
||||
|
||||
+64
-3
@@ -10,8 +10,16 @@ import subprocess
|
||||
|
||||
from io import StringIO
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponse, HttpRequest
|
||||
from django.http import (
|
||||
HttpResponse,
|
||||
HttpRequest,
|
||||
HttpResponseBadRequest,
|
||||
JsonResponse,
|
||||
HttpResponseRedirect,
|
||||
)
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.forms.models import model_to_dict
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from rest_framework.parsers import JSONParser, FileUploadParser
|
||||
from rest_framework.renderers import JSONRenderer
|
||||
@@ -19,8 +27,7 @@ from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from .forms import UploadFileForm, UploadMarkdownForm, TodoForm
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from .models import MarkdownModel
|
||||
from .models import MarkdownModel, NotificationModel, DataModel
|
||||
|
||||
from todo.models import Todo
|
||||
|
||||
@@ -243,3 +250,57 @@ def port(request: HttpRequest, n: int = 1):
|
||||
result = subprocess.check_output(cmd, shell=True)
|
||||
print(result)
|
||||
return HttpResponse(result)
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def notify(request: HttpRequest):
|
||||
"""Notify me with a get request container
|
||||
a get variable `message`."""
|
||||
message = request.GET.get("message")
|
||||
return HttpResponse("")
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def notifications(request: HttpRequest):
|
||||
"""Return the list of notifications."""
|
||||
notifications = NotificationModel.objects.filter(seen=False)
|
||||
for notification in notifications:
|
||||
notification.seen = True
|
||||
notification.save()
|
||||
return JsonResponse(notifications)
|
||||
|
||||
|
||||
def get_client_ip(request: HttpRequest):
|
||||
"""Get the ip addresse of a client."""
|
||||
x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR")
|
||||
if x_forwarded_for:
|
||||
return x_forwarded_for.split(",")[-1].strip()
|
||||
else:
|
||||
return request.META.get("REMOTE_ADDR")
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def store(request: HttpRequest):
|
||||
"""Store data sent."""
|
||||
request_data: dict
|
||||
if request.method == "POST":
|
||||
request_data = request.POST
|
||||
elif request.method == "GET":
|
||||
request_data = {key: value[0] for key, value in request.GET.items()}
|
||||
else:
|
||||
return HttpResponseBadRequest("Only accept POST or GET requests.")
|
||||
print(request_data)
|
||||
data = DataModel(content=json.dumps(request_data), source=get_client_ip(request))
|
||||
data.save()
|
||||
print(data)
|
||||
return JsonResponse(model_to_dict(data))
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def read_store(_: HttpRequest, id: int):
|
||||
"""Read data in the store."""
|
||||
data = DataModel.objects.get(pk=id)
|
||||
data.view_count += 1
|
||||
data.save()
|
||||
print(data)
|
||||
return HttpResponse(data.content, content_type="application/json")
|
||||
|
||||
+25
-24
@@ -1,23 +1,19 @@
|
||||
import time
|
||||
import os
|
||||
import glob
|
||||
import random
|
||||
import datetime
|
||||
import requests
|
||||
|
||||
from django.shortcuts import render, HttpResponse, Http404
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.template import loader
|
||||
from .models import Article
|
||||
from .forms import ArticleForm
|
||||
from .adapt import adapt
|
||||
|
||||
from django.template.loader import engines
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from home.context import home, hydrate
|
||||
from .context import get_articles_objects
|
||||
from rich import print
|
||||
|
||||
|
||||
@@ -55,14 +51,16 @@ def clean_templates():
|
||||
static_cache_path = os.path.join(os.getcwd(), "article/static/article/cache")
|
||||
templates_cache_path = os.path.join(os.getcwd(), "article/templates/cache")
|
||||
|
||||
os.system(f"rm -rf {static_cache_path}")
|
||||
if os.path.exists(static_cache_path):
|
||||
os.system(f"rm -rf {static_cache_path}")
|
||||
# print("static:", static_cache_path)
|
||||
# print("templates:", templates_cache_path)
|
||||
|
||||
print(
|
||||
"before deleting templates",
|
||||
os.listdir(templates_cache_path),
|
||||
)
|
||||
if os.path.exists(templates_cache_path):
|
||||
print(
|
||||
"before deleting templates",
|
||||
os.listdir(templates_cache_path),
|
||||
)
|
||||
path = os.path.join(templates_cache_path, "*")
|
||||
# print('path:', path)
|
||||
for file in glob.glob(path):
|
||||
@@ -79,7 +77,6 @@ def build_template(title: str, article: Article, layout: str = "marc"):
|
||||
markdown_path = os.path.join(os.getcwd(), f"media/article/{title}.md")
|
||||
html_path = os.path.join(os.getcwd(), f"article/templates/cache/{title}.html")
|
||||
article_templates = os.path.join(os.getcwd(), "article/templates/cache")
|
||||
|
||||
article_static = os.path.join(os.getcwd(), "article/static/article")
|
||||
|
||||
with open(markdown_path, "w") as f:
|
||||
@@ -106,22 +103,28 @@ def build_template(title: str, article: Article, layout: str = "marc"):
|
||||
# else:
|
||||
os.system(f"mv {layout_path} {article_static}")
|
||||
|
||||
with open(html_path, "r") as f:
|
||||
text = str(f.read())
|
||||
with open(html_path, "r") as stream:
|
||||
text = str(stream.read())
|
||||
text = adapt(text, title, layout)
|
||||
with open(html_path, "w") as f:
|
||||
f.write(text)
|
||||
with open(html_path, "w") as stream:
|
||||
stream.write(text)
|
||||
|
||||
|
||||
def read(request, title: str):
|
||||
"""Read an article."""
|
||||
reset_template_cache()
|
||||
clean_templates()
|
||||
print("title", title)
|
||||
|
||||
title_no_extension = "".join(title.split(".")[:-1])
|
||||
print("title no extension:", title_no_extension)
|
||||
if "." in title:
|
||||
title_no_extension = "".join(title.split(".")[:-1])
|
||||
else:
|
||||
title_no_extension = title
|
||||
print("title_no_extension", title_no_extension)
|
||||
|
||||
article = Article.objects.filter(title=title_no_extension).first()
|
||||
# article = Article.objects.all()[0]
|
||||
print("article.layout:", article.layout)
|
||||
if not article:
|
||||
raise Http404("This article was not found.")
|
||||
|
||||
@@ -232,16 +235,14 @@ def upload(request):
|
||||
d = fetch_article_data(request.FILES["file"], request)
|
||||
form = ArticleForm(d)
|
||||
if form.is_valid():
|
||||
print(f"[lightgreen]valid form[/]")
|
||||
print("[lightgreen]valid form[/]")
|
||||
form.save()
|
||||
return HttpResponse("success")
|
||||
else:
|
||||
print(f"[red]invalid form[/]")
|
||||
print(f"[red]{form.errors.as_data()}[/]")
|
||||
return HttpResponse("invalid form", status=500)
|
||||
elif request.method == "GET":
|
||||
print("[red]invalid form[/]")
|
||||
print(f"[red]{form.errors.as_data()}[/]")
|
||||
return HttpResponse("invalid form", status=500)
|
||||
if request.method == "GET":
|
||||
form = ArticleForm()
|
||||
context = dict(form=form)
|
||||
return render(request, "api/upload.html", context)
|
||||
else:
|
||||
raise PermissionDenied("Only GET and POST methods are allowed")
|
||||
raise PermissionDenied("Only GET and POST methods are allowed")
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
version: "3.9"
|
||||
|
||||
x-common:
|
||||
website:
|
||||
&website
|
||||
DJANGO_SETTINGS_MODULE: django_project.settings
|
||||
SECRET_KEY: admin
|
||||
FTP_URL: 0.0.0.0:21
|
||||
USER: admin
|
||||
PASSWORD: admin
|
||||
EMAIL: admin@admin.com
|
||||
postgres:
|
||||
&postgres
|
||||
POSTGRES_DB: website
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: admin
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
redis:
|
||||
&redis
|
||||
REDIS_URL: redis:6379
|
||||
|
||||
services:
|
||||
website:
|
||||
image: marcpartensky/website
|
||||
environment:
|
||||
<<: *website
|
||||
<<: *postgres
|
||||
<<: *redis
|
||||
VIRTUAL_HOST: website.dev
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
ports:
|
||||
- "127.0.0.1:8000:80"
|
||||
working_dir: /app
|
||||
entrypoint: /app/entrypoint.sh
|
||||
command: 80 0.0.0.0
|
||||
volumes:
|
||||
- ".:/app"
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
networks:
|
||||
- web
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-fs", "http://website:80/robots.txt"]
|
||||
interval: 1m30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
environment:
|
||||
<<: *postgres
|
||||
ports:
|
||||
- "127.0.0.1:5432:5432"
|
||||
networks:
|
||||
- web
|
||||
|
||||
# pgadmin:
|
||||
# image: dpage/pgadmin4
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# PGADMIN_DEFAULT_EMAIL: admin@admin.com
|
||||
# PGADMIN_DEFAULT_PASSWORD: admin
|
||||
# VIRTUAL_HOST: postgres.dev
|
||||
# volumes:
|
||||
# - dev_pgadmin:/var/lib/pgadmin
|
||||
# ports:
|
||||
# - "15432:80"
|
||||
# networks:
|
||||
# - web
|
||||
|
||||
pgweb:
|
||||
image: sosedoff/pgweb
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:15432:8081"
|
||||
environment:
|
||||
DATABASE_URL: "postgres://admin:admin@postgres:5432/website?sslmode=disable"
|
||||
networks:
|
||||
- web
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
environment:
|
||||
<<: *redis
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
networks:
|
||||
- web
|
||||
|
||||
rediscommander:
|
||||
image: rediscommander/redis-commander
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
VIRTUAL_HOST: redis.dev
|
||||
REDIS_HOST: redis:6379
|
||||
ports:
|
||||
- "127.0.0.1:16379:8081"
|
||||
networks:
|
||||
- web
|
||||
|
||||
# website-test:
|
||||
# environment:
|
||||
# <<: *website
|
||||
# <<: *postgres
|
||||
# <<: *redis
|
||||
# VIRTUAL_HOST: website.dev
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./Dockerfile
|
||||
# working_dir: /app
|
||||
# entrypoint: /app/entrypoint.sh
|
||||
# command: 80 0.0.0.0
|
||||
# volumes:
|
||||
# - ".:/app"
|
||||
# networks:
|
||||
# - web
|
||||
# - caddy
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-fs", "http://website:80/robots.txt"]
|
||||
# interval: 1m30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 40s
|
||||
# labels:
|
||||
# - "caddy=test.marcpartensky.com"
|
||||
# - "caddy.reverse_proxy={{upstreams http 80}}"
|
||||
|
||||
test:
|
||||
image: jwilder/dockerize
|
||||
networks:
|
||||
- web
|
||||
command: -wait http://website:8080/healthcheck -timeout 120s -wait-retry-interval 5s
|
||||
|
||||
networks:
|
||||
web:
|
||||
caddy:
|
||||
external: true
|
||||
volumes:
|
||||
dev_posgres:
|
||||
dev_pgadmin:
|
||||
+44
-19
@@ -197,27 +197,50 @@ COMPRESS_OFFLINE = True
|
||||
WSGI_APPLICATION = "django_project.wsgi.application"
|
||||
|
||||
# Database
|
||||
debug = {
|
||||
DATABASES = {}
|
||||
|
||||
postgres_name = os.environ.get("POSTGRES_DB")
|
||||
if postgres_name:
|
||||
postgres_database = {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": postgres_name,
|
||||
"USER": os.environ.get("POSTGRES_USER"),
|
||||
"PASSWORD": os.environ.get("POSTGRES_PASSWORD"),
|
||||
"HOST": os.environ.get("POSTGRES_HOST"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT"),
|
||||
}
|
||||
DATABASES["default"] = postgres_database
|
||||
print("PostgreSQL logins detected, using those as default")
|
||||
|
||||
mysql_name = os.environ.get("MYSQL_DATABASE")
|
||||
if mysql_name:
|
||||
mysql_database = {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"NAME": mysql_name,
|
||||
"USER": os.environ.get("MYSQL_USER"),
|
||||
"PASSWORD": os.environ.get("MYSQL_PASSWORD"),
|
||||
"HOST": os.environ.get("MYSQL_HOST"),
|
||||
"PORT": os.environ.get("MYSQL_PORT"),
|
||||
}
|
||||
if "default" not in DATABASES:
|
||||
DATABASES["default"] = mysql_database
|
||||
print("MySQL logins detected, using those as default")
|
||||
else:
|
||||
DATABASES["mysql"] = mysql_database
|
||||
print("MySQL logins detected, using as second database")
|
||||
|
||||
local_db = {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
||||
}
|
||||
|
||||
production = {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": os.environ.get("POSTGRES_NAME"),
|
||||
"USER": os.environ.get("POSTGRES_USER"),
|
||||
"PASSWORD": os.environ.get("POSTGRES_PASSWORD"),
|
||||
"HOST": os.environ.get("POSTGRES_HOST"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT"),
|
||||
}
|
||||
|
||||
if DEBUG:
|
||||
DATABASES = dict(default=debug, production=production)
|
||||
if "default" not in DATABASES:
|
||||
DATABASES["default"] = local_db
|
||||
print("No database detected, using local MySQL database as default")
|
||||
else:
|
||||
DATABASES = dict(default=production, debug=debug)
|
||||
DATABASES["debug"] = local_db
|
||||
print("Using local MySQL database as debug database")
|
||||
|
||||
# print('production port:', os.environ.get('POSTGRES_PORT'))
|
||||
# print("DATABASES:", DATABASES)
|
||||
|
||||
# DATABASES = {
|
||||
# 'default': {
|
||||
@@ -451,10 +474,12 @@ MDEDITOR_CONFIGS = {
|
||||
|
||||
# SQL Explorer : https://pypi.org/project/django-sql-explorer/
|
||||
# EXPLORER_DEFAULT_CONNECTION = 'readonly'
|
||||
if DEBUG:
|
||||
EXPLORER_CONNECTIONS = {"Default": "default", "Production": "production"}
|
||||
else:
|
||||
EXPLORER_CONNECTIONS = {"Default": "default", "Debug": "debug"}
|
||||
|
||||
EXPLORER_CONNECTIONS = {"Default": "default"}
|
||||
if "mysql" in DATABASES:
|
||||
EXPLORER_CONNECTIONS["Mysql"] = "mysql"
|
||||
if "debug" in DATABASES:
|
||||
EXPLORER_CONNECTIONS["Debug"] = "debug"
|
||||
|
||||
EXPLORER_DEFAULT_CONNECTION = "default"
|
||||
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import views as auth_views
|
||||
from django.http import HttpResponse
|
||||
from django.urls import path, include
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.core.exceptions import ViewDoesNotExist
|
||||
|
||||
|
||||
# def response_error_handler(request, exception=None):
|
||||
# raise HttpResponse('<div class="tenor-gif-embed" data-postid="5094560" data-share-method="host" data-width="100%" data-aspect-ratio="1.7543859649122806"><a href="https://tenor.com/view/elmo-shrug-gif-5094560">Elmo Shrug GIF</a> from <a href="https://tenor.com/search/elmo-gifs">Elmo GIFs</a></div><script type="text/javascript" async src="https://tenor.com/embed.js"></script>', status=404)
|
||||
|
||||
|
||||
def not_found_view(request):
|
||||
raise ViewDoesNotExist
|
||||
|
||||
|
||||
def healthcheck(request):
|
||||
return HttpResponse(content="Ok")
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
# path('users/login/', auth_views.LoginView.as_view()),
|
||||
@@ -43,6 +44,7 @@ urlpatterns = [
|
||||
# path('accounts/', include('allauth.urls')),
|
||||
path("mdeditor/", include("mdeditor.urls")),
|
||||
path("404/", not_found_view, name="404"),
|
||||
path("live", healthcheck, name="healthcheck"),
|
||||
path("business/", include("business.urls")),
|
||||
path("avatar/", include("avatar.urls")),
|
||||
path("robots.txt", include("robots.urls")),
|
||||
|
||||
+5
-11
@@ -3,13 +3,13 @@ x-common:
|
||||
website:
|
||||
&website
|
||||
DJANGO_SETTINGS_MODULE: django_project.settings
|
||||
SECRET_KEY: openssl rand -base64 64
|
||||
SECRET_KEY: "$${openssl rand -base64 64}"
|
||||
FTP_URL: 0.0.0.0:21
|
||||
postgres:
|
||||
&postgres
|
||||
POSTGRES_NAME: website
|
||||
POSTGRESQL_USER: root
|
||||
POSTGRES_PASSWORD: openssl rand -base64 64
|
||||
POSTGRES_PASSWORD: "$${openssl rand -base64 64}"
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
redis:
|
||||
@@ -18,6 +18,7 @@ x-common:
|
||||
|
||||
services:
|
||||
website:
|
||||
image: docker.io/marcpartensky/website:latest
|
||||
environment:
|
||||
<<: *website
|
||||
<<: *postgres
|
||||
@@ -26,11 +27,9 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "8000:80"
|
||||
working_dir: /app
|
||||
entrypoint: >
|
||||
sh -c "./manage.py migrate;
|
||||
./manage.py runserver 0.0.0.0:8000"
|
||||
entrypoint: /app/entrypoint.sh
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
@@ -41,8 +40,6 @@ services:
|
||||
image: redis
|
||||
environment:
|
||||
<<: *redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- website
|
||||
|
||||
@@ -50,9 +47,6 @@ services:
|
||||
image: postgres
|
||||
environment:
|
||||
<<: *postgres
|
||||
ports:
|
||||
# - "3306:3306"
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- website
|
||||
|
||||
|
||||
+37
-3
@@ -1,5 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
./manage.py makemigrations
|
||||
./manage.py migrate
|
||||
daphne django_project.asgi:application --port 80 --bind website -v2
|
||||
port=${1:-$PORT}
|
||||
host=${2:-$HOST}
|
||||
port=${port:-"80"}
|
||||
host=${addr:-"0.0.0.0"}
|
||||
username=${DJANGO_SUPERUSER_USERNAME:-"admin"}
|
||||
email=${DJANGO_SUPERUSER_EMAIL:-"admin@admin.com"}
|
||||
DJANGO_SUPERUSER_PASSWORD=${PASSWORD:-$(date +%s | sha256sum | base64 | head -c 32)}
|
||||
|
||||
_kill() {
|
||||
kill $(cat /tmp/website.pid)
|
||||
}
|
||||
|
||||
if [ $1 = "kill" ]; then
|
||||
_kill
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo $$ > /tmp/website.pid
|
||||
|
||||
setup() {
|
||||
echo -e "Running \033[1mentrypoint.sh\033[0m using $HOST:$PORT"
|
||||
./manage.py migrate
|
||||
echo -e "Creating \033[1msuper user\033[0m using:\n - username: \033[1m$username\033[0m\n - email: \033[1m$email\033[0m\n"
|
||||
./manage.py createsuperuser --user $username --email $email --noinput
|
||||
./manage.py collectstatic --noinput --clear
|
||||
}
|
||||
|
||||
if [[ ! -z $NOSETUP && ! $1 = "--nosetup" ]]; then
|
||||
setup
|
||||
fi
|
||||
|
||||
# dev vs prod
|
||||
if [ -z $PRODUCTION ]; then
|
||||
daphne django_project.asgi:application --port $port --bind $host -v2
|
||||
else
|
||||
./manage.py runserver 127.0.0.1:8000
|
||||
fi
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
<p>fdp</p>
|
||||
<!--<div class="tenor-gif-embed" data-postid="11924336" data-share-method="host" data-width="100%" data-aspect-ratio="1.3387096774193548"><a href="https://tenor.com/view/system-failure-system-down-error-gif-11924336">System Failure System Down GIF</a> from <a href="https://tenor.com/search/systemfailure-gifs">Systemfailure GIFs</a></div><script type="text/javascript" async src="https://tenor.com/embed.js"></script>-->
|
||||
|
||||
+24
-2
@@ -1,3 +1,25 @@
|
||||
from django.test import TestCase
|
||||
import os
|
||||
import geckodriver_autoinstaller
|
||||
|
||||
# Create your tests here.
|
||||
from django.test import TestCase
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
|
||||
|
||||
class HomePageTestCase(TestCase):
|
||||
def setUp(self):
|
||||
"""Setup selenium."""
|
||||
geckodriver_autoinstaller.install()
|
||||
options = Options()
|
||||
options.headless = True if os.environ.get("HEADLESS") != "False" else False
|
||||
self.driver = webdriver.Firefox(options=options)
|
||||
host = os.environ["HOST"]
|
||||
port = os.environ["PORT"]
|
||||
self.url = f"{host}:{port}"
|
||||
|
||||
def test_home_page_loads(self):
|
||||
"""Animals that can speak are correctly identified"""
|
||||
self.driver.get(self.url)
|
||||
icon = self.driver.find_element_by_id("theme-img")
|
||||
icon.click()
|
||||
assert True
|
||||
|
||||
Generated
+83
-62
@@ -13,9 +13,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
@@ -93,9 +93,9 @@
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"node_modules/core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
@@ -173,9 +173,9 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz",
|
||||
"integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==",
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
|
||||
"integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
@@ -261,9 +261,9 @@
|
||||
"integrity": "sha1-oSvbAQNoHosSapsHHrpMRnx4//4="
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz",
|
||||
"integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
@@ -272,9 +272,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
|
||||
},
|
||||
"node_modules/miniq": {
|
||||
"version": "1.0.1",
|
||||
@@ -386,12 +386,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.20.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
|
||||
"integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
|
||||
"version": "1.22.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
|
||||
"integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.2.0",
|
||||
"path-parse": "^1.0.6"
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -430,29 +434,40 @@
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
|
||||
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
"strip-ansi": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/through2": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz",
|
||||
@@ -483,9 +498,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/uglify-js": {
|
||||
"version": "3.13.10",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz",
|
||||
"integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==",
|
||||
"version": "3.15.5",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.5.tgz",
|
||||
"integrity": "sha512-hNM5q5GbBRB5xB+PMqVRcgYe4c8jbyZ1pzZhS6jbq54/4F2gFK869ZheiE5A8/t+W5jtTNpWef/5Q9zk639FNQ==",
|
||||
"optional": true,
|
||||
"bin": {
|
||||
"uglifyjs": "bin/uglifyjs"
|
||||
@@ -602,9 +617,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
@@ -667,9 +682,9 @@
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
@@ -727,9 +742,9 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"is-core-module": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz",
|
||||
"integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==",
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
|
||||
"integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
|
||||
"requires": {
|
||||
"has": "^1.0.3"
|
||||
}
|
||||
@@ -797,17 +812,17 @@
|
||||
"integrity": "sha1-oSvbAQNoHosSapsHHrpMRnx4//4="
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz",
|
||||
"integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==",
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
|
||||
},
|
||||
"miniq": {
|
||||
"version": "1.0.1",
|
||||
@@ -920,12 +935,13 @@
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.20.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
|
||||
"integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
|
||||
"version": "1.22.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
|
||||
"integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
|
||||
"requires": {
|
||||
"is-core-module": "^2.2.0",
|
||||
"path-parse": "^1.0.6"
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
@@ -944,23 +960,28 @@
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
|
||||
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"requires": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
"strip-ansi": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
"ansi-regex": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
|
||||
},
|
||||
"through2": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz",
|
||||
@@ -990,9 +1011,9 @@
|
||||
}
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.13.10",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz",
|
||||
"integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==",
|
||||
"version": "3.15.5",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.5.tgz",
|
||||
"integrity": "sha512-hNM5q5GbBRB5xB+PMqVRcgYe4c8jbyZ1pzZhS6jbq54/4F2gFK869ZheiE5A8/t+W5jtTNpWef/5Q9zk639FNQ==",
|
||||
"optional": true
|
||||
},
|
||||
"util-deprecate": {
|
||||
|
||||
+126
-97
@@ -1,151 +1,180 @@
|
||||
#
|
||||
# These requirements were autogenerated by pipenv
|
||||
# To regenerate from the project's Pipfile, run:
|
||||
#
|
||||
# pipenv lock --requirements
|
||||
#
|
||||
|
||||
-i https://pypi.org/simple
|
||||
aioredis==1.3.1
|
||||
appdirs==1.4.4
|
||||
appnope==0.1.2
|
||||
arrow==1.1.0
|
||||
asgiref==3.3.4
|
||||
astroid==2.5.6
|
||||
async-timeout==3.0.1
|
||||
attrs==21.2.0
|
||||
autobahn==21.3.1
|
||||
Automat==20.2.0
|
||||
appnope==0.1.3
|
||||
arrow==1.2.2
|
||||
asgiref==3.5.2
|
||||
astroid==2.11.5
|
||||
async-generator==1.10; python_version >= '3.5'
|
||||
async-timeout==4.0.2
|
||||
attrs==21.4.0
|
||||
autobahn==22.4.2
|
||||
automat==20.2.0
|
||||
backcall==0.2.0
|
||||
blessed==1.18.0
|
||||
boto3==1.17.69
|
||||
botocore==1.20.69
|
||||
certifi==2020.12.5
|
||||
cffi==1.14.5
|
||||
channels==3.0.3
|
||||
channels-redis==3.2.0
|
||||
backports.zoneinfo==0.2.1; python_version < '3.9'
|
||||
blessed==1.19.1
|
||||
boto3==1.23.6
|
||||
botocore==1.26.6
|
||||
bpyutils==0.5.2
|
||||
certifi==2022.5.18.1
|
||||
cffi==1.15.0
|
||||
channels-redis==3.4.0
|
||||
channels==3.0.4
|
||||
chardet==4.0.0
|
||||
click==7.1.2
|
||||
charset-normalizer==2.0.12; python_version >= '3'
|
||||
click==8.1.3
|
||||
colorama==0.4.4
|
||||
commonmark==0.9.1
|
||||
constantly==15.1.0
|
||||
coverage==5.5
|
||||
cryptography==3.4.7
|
||||
coverage==6.4
|
||||
cryptography==37.0.2
|
||||
daphne==3.0.2
|
||||
decorator==5.0.7
|
||||
decorator==5.1.1
|
||||
defusedxml==0.7.1
|
||||
dill==0.3.5.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
|
||||
dj-database-url==0.5.0
|
||||
Django==3.2.2
|
||||
django-503==0.1
|
||||
django-admin==2.0.1
|
||||
django-allauth==0.44.0
|
||||
django-appconf==1.0.4
|
||||
django-allauth==0.50.0
|
||||
django-appconf==1.0.5
|
||||
django-avatar==5.0.0
|
||||
django-compressor==2.4.1
|
||||
django-compressor==4.0
|
||||
django-cors-middleware==1.5.0
|
||||
django-crispy-forms==1.11.2
|
||||
django-crispy-forms==1.14.0
|
||||
django-excel-base==1.0.4
|
||||
django-excel-response2==3.0.2
|
||||
django-extensions==3.1.3
|
||||
django-ftpserver==0.7.0
|
||||
django-extensions==3.1.5
|
||||
django-ftpserver==0.8.0
|
||||
django-heroku==0.3.1
|
||||
django-jsonfield-backport==1.0.3
|
||||
django-libsass==0.8
|
||||
django-markdown-view==0.0.4
|
||||
django-mdeditor==0.1.18
|
||||
django-jsonfield-backport==1.0.5
|
||||
django-libsass==0.9
|
||||
django-markdown-view==0.0.5
|
||||
django-mdeditor==0.1.20
|
||||
django-picklefield==3.0.1
|
||||
django-q==1.3.5
|
||||
django-q==1.3.9
|
||||
django-rename-app==0.1.3
|
||||
django-robots==4.0
|
||||
django-robots==5.0
|
||||
django-shortuuidfield==0.1.3
|
||||
django-six==1.0.4
|
||||
django-sql-explorer==2.1.2
|
||||
django-storages==1.11.1
|
||||
djangorestframework==3.12.4
|
||||
django-sql-explorer==2.4.1
|
||||
django-storages==1.12.3
|
||||
django==3.2.13
|
||||
djangorestframework==3.13.1
|
||||
docopt==0.6.2
|
||||
docutils==0.17.1
|
||||
docutils==0.18.1
|
||||
flake8==3.9.2
|
||||
future==0.18.2
|
||||
graphviz==0.16
|
||||
geckodriver-autoinstaller==0.1.0
|
||||
graphviz==0.20
|
||||
gunicorn==20.1.0
|
||||
h2==4.0.0
|
||||
h11==0.13.0; python_version >= '3.6'
|
||||
h2==4.1.0
|
||||
hiredis==2.0.0
|
||||
hpack==4.0.0
|
||||
hyperframe==6.0.1
|
||||
hyperlink==21.0.0
|
||||
idna==2.10
|
||||
importlib-metadata==4.0.1
|
||||
idna==3.3
|
||||
importlib-metadata==4.11.4
|
||||
incremental==21.3.0
|
||||
ipython==7.23.1
|
||||
ipython-genutils==0.2.0
|
||||
isort==5.8.0
|
||||
jedi==0.18.0
|
||||
jeepney==0.6.0
|
||||
jmespath==0.10.0
|
||||
keyring==23.0.1
|
||||
ipython==7.33.0
|
||||
isort==5.10.1
|
||||
jedi==0.18.1
|
||||
jeepney==0.8.0
|
||||
jmespath==1.0.0
|
||||
keyring==23.5.1
|
||||
keyrings.alt==3.2.0
|
||||
lazy-object-proxy==1.6.0
|
||||
libsass==0.20.1
|
||||
Markdown==3.2.2
|
||||
matplotlib-inline==0.1.2
|
||||
lazy-object-proxy==1.7.1
|
||||
libsass==0.21.0
|
||||
markdown==3.3.7
|
||||
matplotlib-inline==0.1.3; python_version >= '3.5'
|
||||
mccabe==0.6.1
|
||||
mock==4.0.3
|
||||
msgpack==1.0.2
|
||||
msgpack-python==0.5.6
|
||||
msgpack==1.0.3
|
||||
mypy-extensions==0.4.3
|
||||
nose==1.3.7
|
||||
oauthlib==3.1.0
|
||||
packaging==20.9
|
||||
parso==0.8.2
|
||||
pathspec==0.8.1
|
||||
oauthlib==3.2.0
|
||||
outcome==1.1.0; python_version >= '3.6'
|
||||
packaging==21.3; python_version >= '3.6'
|
||||
parso==0.8.3
|
||||
pathspec==0.9.0
|
||||
pexpect==4.8.0
|
||||
pickleshare==0.7.5
|
||||
Pillow==8.2.0
|
||||
pip-autoremove==0.9.1
|
||||
pillow==9.1.1
|
||||
pip-autoremove==0.10.0
|
||||
pip-conflict-checker==0.6.0
|
||||
pip-review==1.1.0
|
||||
pipdeptree==2.0.0
|
||||
pipupgrade==1.9.0
|
||||
priority==1.3.0
|
||||
prompt-toolkit==3.0.18
|
||||
psycopg2==2.8.6
|
||||
psycopg2-binary==2.8.6
|
||||
pip-review==1.1.1
|
||||
pip==22.1.1; python_version >= '3.7'
|
||||
pipdeptree==2.2.1
|
||||
pipupgrade==1.12.0
|
||||
platformdirs==2.5.2; python_version >= '3.7'
|
||||
priority==2.0.0
|
||||
prompt-toolkit==3.0.29
|
||||
psycopg2-binary==2.9.3
|
||||
psycopg2==2.9.3; python_version >= '3.6'
|
||||
ptyprocess==0.7.0
|
||||
pyasn1==0.4.8
|
||||
pyasn1-modules==0.2.8
|
||||
pyasn1==0.4.8
|
||||
pycodestyle==2.7.0
|
||||
pycparser==2.20
|
||||
pycparser==2.21
|
||||
pyflakes==2.3.1
|
||||
pyftpdlib==1.5.6
|
||||
Pygments==2.9.0
|
||||
PyHamcrest==2.0.2
|
||||
PyJWT==2.1.0
|
||||
pylint==2.8.2
|
||||
pyOpenSSL==20.0.1
|
||||
pyparsing==2.4.7
|
||||
python-dateutil==2.8.1
|
||||
python-dotenv==0.17.1
|
||||
pygments==2.12.0
|
||||
pyhamcrest==2.0.3
|
||||
pyjwt==2.4.0
|
||||
pylint==2.13.9
|
||||
pyopenssl==22.0.0
|
||||
pyparsing==3.0.9
|
||||
pysocks==1.7.1
|
||||
python-dateutil==2.8.2
|
||||
python-dotenv==0.20.0
|
||||
python3-openid==3.2.0
|
||||
pytz==2021.1
|
||||
PyYAML==5.4.1
|
||||
rcssmin==1.0.6
|
||||
pytz-deprecation-shim==0.1.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
|
||||
pytz==2022.1
|
||||
pyyaml==6.0
|
||||
rcssmin==1.1.0
|
||||
redis==3.5.3
|
||||
regex==2021.4.4
|
||||
requests==2.25.1
|
||||
requests-oauthlib==1.3.0
|
||||
rich==10.1.0
|
||||
rjsmin==1.1.0
|
||||
s3transfer==0.4.2
|
||||
regex==2022.4.24
|
||||
requests-oauthlib==1.3.1
|
||||
requests==2.27.1
|
||||
rich==12.4.4
|
||||
rjsmin==1.2.0
|
||||
s3transfer==0.5.2
|
||||
screen==1.0.1
|
||||
SecretStorage==3.3.1
|
||||
service-identity==18.1.0
|
||||
shortuuid==1.0.1
|
||||
secretstorage==3.3.2
|
||||
selenium==4.1.5
|
||||
service-identity==21.1.0
|
||||
setuptools==62.3.2; python_version >= '3.7'
|
||||
shortuuid==1.0.9
|
||||
six==1.16.0
|
||||
sqlparse==0.4.1
|
||||
sniffio==1.2.0; python_version >= '3.5'
|
||||
sortedcontainers==2.4.0
|
||||
sqlparse==0.4.2
|
||||
toml==0.10.2
|
||||
traitlets==5.0.5
|
||||
Twisted==21.2.0
|
||||
txaio==21.2.1
|
||||
typed-ast==1.4.3
|
||||
typing-extensions==3.10.0.0
|
||||
tzlocal==2.1
|
||||
urllib3==1.26.4
|
||||
tomli==2.0.1; python_version < '3.11'
|
||||
traitlets==5.2.1.post0
|
||||
trio-websocket==0.9.2; python_version >= '3.5'
|
||||
trio==0.20.0; python_version >= '3.7'
|
||||
twisted==22.4.0
|
||||
txaio==22.2.1
|
||||
typed-ast==1.5.4
|
||||
typing-extensions==4.2.0
|
||||
tzdata==2022.1; python_version >= '3.6'
|
||||
tzlocal==4.2
|
||||
urllib3==1.26.9
|
||||
wcwidth==0.2.5
|
||||
whitenoise==5.2.0
|
||||
wrapt==1.12.1
|
||||
whitenoise==6.1.0
|
||||
wrapt==1.14.1
|
||||
wsproto==1.1.0; python_version >= '3.7'
|
||||
xlwt==1.3.0
|
||||
yarg==0.1.9
|
||||
zipp==3.4.1
|
||||
zipp==3.8.0
|
||||
zope.interface==5.4.0
|
||||
|
||||
@@ -27,21 +27,6 @@ django() {
|
||||
pipenv run daphne -e "ssl:${PORT}:privateKey=${KEY}:certKey=${CERT}" django_project.asgi:application
|
||||
}
|
||||
|
||||
alias run=django
|
||||
|
||||
up() {
|
||||
postgres
|
||||
redis
|
||||
django
|
||||
}
|
||||
|
||||
down() {
|
||||
docker-compose down
|
||||
echo -e "Ended \e[31mRedis\e[0m"
|
||||
echo -e "Ended \e[31mPostgreSQL\e[0m"
|
||||
kill % && echo -e "Ended \e[31mDjango\e[0m" && echo -e "Ended \e[31mFTP\e[0m"
|
||||
}
|
||||
|
||||
ftp() {
|
||||
echo -e "Starting \e[92mFTP Server\e[0m"
|
||||
pipenv run ./manage.py ftpserver $FTP_URL
|
||||
@@ -53,24 +38,7 @@ all() {
|
||||
down
|
||||
}
|
||||
|
||||
|
||||
# build the project for docker
|
||||
build() {
|
||||
pipenv run ./manage.py collectstatic --noinput
|
||||
docker build . -t marcpartensky/website
|
||||
docker push marcpartensky/website
|
||||
git pull --all
|
||||
git push -ll
|
||||
}
|
||||
|
||||
deploy() {
|
||||
pipenv run ./manage.py collectstatic --noinput
|
||||
pipenv run ./manage.py makemigrations
|
||||
pipenv run ./manage.py migrate
|
||||
run
|
||||
}
|
||||
|
||||
update() {
|
||||
updatepip() {
|
||||
git pull
|
||||
pipenv run pip install -U pip
|
||||
pipenv run pip install -r requirements.txt -U
|
||||
|
||||
@@ -1 +1 @@
|
||||
<div class="tenor-gif-embed" data-postid="11924336" data-share-method="host" data-width="100%" data-aspect-ratio="1.3387096774193548"><a href="https://tenor.com/view/system-failure-system-down-error-gif-11924336">System Failure System Down GIF</a> from <a href="https://tenor.com/search/systemfailure-gifs">Systemfailure GIFs</a></div><script type="text/javascript" async src="https://tenor.com/embed.js"></script>
|
||||
500
|
||||
|
||||
Reference in New Issue
Block a user