From feaa39f103cae569275881cb2d8dd8c607a503e0 Mon Sep 17 00:00:00 2001 From: Murilo Rosa Date: Wed, 9 Mar 2022 16:27:53 +0000 Subject: [PATCH] restart development w/out docker --- .dockerignore | 10 - .envs/.local/.django | 4 - .envs/.local/.postgres | 7 - .github/dependabot.yml | 87 - .github/workflows/ci.yml | 60 - .gitignore | 8 +- .idea/.gitignore | 8 - .idea/misc.xml | 3 +- .idea/modules.xml | 2 +- ...on_portugal_2022.iml => pycon_pt_2022.iml} | 11 +- .../docker_compose_up_django.xml | 17 - .../docker_compose_up_docs.xml | 16 - .../merge_production_dotenvs_in_dotenv.xml | 2 +- .idea/runConfigurations/migrate.xml | 2 +- .idea/runConfigurations/pytest___.xml | 2 +- .idea/runConfigurations/pytest__users.xml | 4 +- .idea/runConfigurations/runserver.xml | 2 +- .idea/runConfigurations/runserver_plus.xml | 2 +- .idea/webResources.xml | 2 +- README.md | 8 +- compose/local/django/Dockerfile | 69 - compose/local/django/start | 9 - compose/local/docs/Dockerfile | 64 - compose/local/docs/start | 7 - compose/local/node/Dockerfile | 9 - compose/production/django/Dockerfile | 90 - compose/production/django/entrypoint | 42 - compose/production/django/start | 10 - compose/production/postgres/Dockerfile | 6 - .../maintenance/_sourced/constants.sh | 5 - .../maintenance/_sourced/countdown.sh | 12 - .../postgres/maintenance/_sourced/messages.sh | 41 - .../postgres/maintenance/_sourced/yes_no.sh | 16 - .../production/postgres/maintenance/backup | 38 - .../production/postgres/maintenance/backups | 22 - .../production/postgres/maintenance/restore | 55 - compose/production/traefik/Dockerfile | 5 - compose/production/traefik/traefik.yml | 58 - config/settings/base.py | 28 +- config/settings/local.py | 12 +- config/settings/test.py | 2 +- config/urls.py | 2 +- config/wsgi.py | 4 +- docs/Makefile | 5 +- docs/conf.py | 2 +- docs/howto.rst | 14 +- docs/make.bat | 2 +- docs/pycharm/configuration.rst | 2 +- docs/users.rst | 2 +- gulpfile.js | 6 +- local.yml | 71 - manage.py | 4 +- merge_production_dotenvs_in_dotenv.py | 67 - package-lock.json | 20177 ---------------- package.json | 2 +- production.yml | 48 - .../__init__.py | 0 .../conftest.py | 4 +- .../contrib/__init__.py | 0 .../contrib/sites/__init__.py | 0 .../contrib/sites/migrations/0001_initial.py | 0 .../migrations/0002_alter_domain_unique.py | 0 .../0003_set_site_domain_and_name.py | 0 .../0004_alter_options_ordering_domain.py | 0 .../contrib/sites/migrations/__init__.py | 0 .../static/fonts/.gitkeep | 0 .../static/images/favicons/favicon.ico | Bin .../static/js/project.js | 0 .../static/sass/custom_bootstrap_vars.scss | 0 .../static/sass/project.scss | 0 .../templates/403.html | 0 .../templates/404.html | 0 .../templates/500.html | 0 .../templates/account/account_inactive.html | 0 .../templates/account/base.html | 0 .../templates/account/email.html | 0 .../templates/account/email_confirm.html | 0 .../templates/account/login.html | 0 .../templates/account/logout.html | 0 .../templates/account/password_change.html | 0 .../templates/account/password_reset.html | 0 .../account/password_reset_done.html | 0 .../account/password_reset_from_key.html | 0 .../account/password_reset_from_key_done.html | 0 .../templates/account/password_set.html | 0 .../templates/account/signup.html | 0 .../templates/account/signup_closed.html | 0 .../templates/account/verification_sent.html | 0 .../account/verified_email_required.html | 0 .../templates/base.html | 2 +- .../templates/pages/about.html | 0 .../templates/pages/home.html | 0 .../templates/users/user_detail.html | 0 .../templates/users/user_form.html | 0 .../users/__init__.py | 0 .../users/adapters.py | 0 .../users/admin.py | 2 +- .../users/apps.py | 4 +- .../users/context_processors.py | 0 .../users/forms.py | 0 .../users/migrations/0001_initial.py | 0 .../users/migrations/__init__.py | 0 .../users/models.py | 0 .../users/tests/__init__.py | 0 .../users/tests/factories.py | 0 .../users/tests/test_admin.py | 2 +- .../users/tests/test_forms.py | 4 +- .../users/tests/test_models.py | 2 +- .../users/tests/test_urls.py | 2 +- .../users/tests/test_views.py | 8 +- .../users/urls.py | 2 +- .../users/views.py | 0 .../utils/__init__.py | 0 requirements/local.txt | 2 +- setup.cfg | 4 +- utility/install_os_dependencies.sh | 96 + utility/install_python_dependencies.sh | 37 + utility/requirements-bionic.apt | 23 + utility/requirements-bullseye.apt | 23 + utility/requirements-buster.apt | 23 + utility/requirements-focal.apt | 23 + utility/requirements-jessie.apt | 23 + utility/requirements-stretch.apt | 23 + utility/requirements-trusty.apt | 23 + utility/requirements-xenial.apt | 23 + 125 files changed, 396 insertions(+), 21224 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .envs/.local/.django delete mode 100644 .envs/.local/.postgres delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .idea/.gitignore rename .idea/{pycon_portugal_2022.iml => pycon_pt_2022.iml} (85%) delete mode 100644 .idea/runConfigurations/docker_compose_up_django.xml delete mode 100644 .idea/runConfigurations/docker_compose_up_docs.xml delete mode 100644 compose/local/django/Dockerfile delete mode 100644 compose/local/django/start delete mode 100644 compose/local/docs/Dockerfile delete mode 100644 compose/local/docs/start delete mode 100644 compose/local/node/Dockerfile delete mode 100644 compose/production/django/Dockerfile delete mode 100644 compose/production/django/entrypoint delete mode 100644 compose/production/django/start delete mode 100644 compose/production/postgres/Dockerfile delete mode 100644 compose/production/postgres/maintenance/_sourced/constants.sh delete mode 100644 compose/production/postgres/maintenance/_sourced/countdown.sh delete mode 100644 compose/production/postgres/maintenance/_sourced/messages.sh delete mode 100644 compose/production/postgres/maintenance/_sourced/yes_no.sh delete mode 100644 compose/production/postgres/maintenance/backup delete mode 100644 compose/production/postgres/maintenance/backups delete mode 100644 compose/production/postgres/maintenance/restore delete mode 100644 compose/production/traefik/Dockerfile delete mode 100644 compose/production/traefik/traefik.yml delete mode 100644 local.yml delete mode 100644 merge_production_dotenvs_in_dotenv.py delete mode 100644 package-lock.json delete mode 100644 production.yml rename {pycon_portugal_2022 => pycon_pt_2022}/__init__.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/conftest.py (61%) rename {pycon_portugal_2022 => pycon_pt_2022}/contrib/__init__.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/contrib/sites/__init__.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/contrib/sites/migrations/0001_initial.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/contrib/sites/migrations/0002_alter_domain_unique.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/contrib/sites/migrations/0003_set_site_domain_and_name.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/contrib/sites/migrations/0004_alter_options_ordering_domain.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/contrib/sites/migrations/__init__.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/static/fonts/.gitkeep (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/static/images/favicons/favicon.ico (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/static/js/project.js (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/static/sass/custom_bootstrap_vars.scss (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/static/sass/project.scss (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/403.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/404.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/500.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/account_inactive.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/base.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/email.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/email_confirm.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/login.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/logout.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/password_change.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/password_reset.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/password_reset_done.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/password_reset_from_key.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/password_reset_from_key_done.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/password_set.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/signup.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/signup_closed.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/verification_sent.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/account/verified_email_required.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/base.html (98%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/pages/about.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/pages/home.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/users/user_detail.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/templates/users/user_form.html (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/__init__.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/adapters.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/admin.py (91%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/apps.py (68%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/context_processors.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/forms.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/migrations/0001_initial.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/migrations/__init__.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/models.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/tests/__init__.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/tests/factories.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/tests/test_admin.py (96%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/tests/test_forms.py (90%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/tests/test_models.py (76%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/tests/test_urls.py (92%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/tests/test_views.py (93%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/urls.py (87%) rename {pycon_portugal_2022 => pycon_pt_2022}/users/views.py (100%) rename {pycon_portugal_2022 => pycon_pt_2022}/utils/__init__.py (100%) create mode 100755 utility/install_os_dependencies.sh create mode 100755 utility/install_python_dependencies.sh create mode 100644 utility/requirements-bionic.apt create mode 100644 utility/requirements-bullseye.apt create mode 100644 utility/requirements-buster.apt create mode 100644 utility/requirements-focal.apt create mode 100644 utility/requirements-jessie.apt create mode 100644 utility/requirements-stretch.apt create mode 100644 utility/requirements-trusty.apt create mode 100644 utility/requirements-xenial.apt diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 5518e60..0000000 --- a/.dockerignore +++ /dev/null @@ -1,10 +0,0 @@ -.editorconfig -.gitattributes -.github -.gitignore -.gitlab-ci.yml -.idea -.pre-commit-config.yaml -.readthedocs.yml -.travis.yml -venv diff --git a/.envs/.local/.django b/.envs/.local/.django deleted file mode 100644 index bcde257..0000000 --- a/.envs/.local/.django +++ /dev/null @@ -1,4 +0,0 @@ -# General -# ------------------------------------------------------------------------------ -USE_DOCKER=yes -IPYTHONDIR=/app/.ipython diff --git a/.envs/.local/.postgres b/.envs/.local/.postgres deleted file mode 100644 index 2427be8..0000000 --- a/.envs/.local/.postgres +++ /dev/null @@ -1,7 +0,0 @@ -# PostgreSQL -# ------------------------------------------------------------------------------ -POSTGRES_HOST=postgres -POSTGRES_PORT=5432 -POSTGRES_DB=pycon_portugal_2022 -POSTGRES_USER=waUusthnAqRXFjjdFNPRukoVtTQEzVEs -POSTGRES_PASSWORD=7pbeTdim4Sr3ehM8mNKdGgxsQOv8Esho1tfwQaYsAYCfGGD6CbKSklFKwY8LYJI6 diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a663263..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,87 +0,0 @@ -# Config for Dependabot updates. See Documentation here: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - # Update GitHub actions in workflows - - package-ecosystem: "github-actions" - directory: "/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Docker - # We need to specify each Dockerfile in a separate entry because Dependabot doesn't - # support wildcards or recursively checking subdirectories. Check this issue for updates: - # https://github.com/dependabot/dependabot-core/issues/2178 - - package-ecosystem: "docker" - # Look for a `Dockerfile` in the `compose/local/django` directory - directory: "compose/local/django/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Docker - - package-ecosystem: "docker" - # Look for a `Dockerfile` in the `compose/local/docs` directory - directory: "compose/local/docs/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Docker - - package-ecosystem: "docker" - # Look for a `Dockerfile` in the `compose/local/node` directory - directory: "compose/local/node/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Docker - - package-ecosystem: "docker" - # Look for a `Dockerfile` in the `compose/production/aws` directory - directory: "compose/production/aws/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Docker - - package-ecosystem: "docker" - # Look for a `Dockerfile` in the `compose/production/django` directory - directory: "compose/production/django/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Docker - - package-ecosystem: "docker" - # Look for a `Dockerfile` in the `compose/production/postgres` directory - directory: "compose/production/postgres/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Docker - - package-ecosystem: "docker" - # Look for a `Dockerfile` in the `compose/production/traefik` directory - directory: "compose/production/traefik/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for Python/Pip - Production - - package-ecosystem: "pip" - # Look for a `requirements.txt` in the `root` directory - # also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt' - directory: "/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" - - # Enable version updates for javascript/npm - - package-ecosystem: "npm" - # Look for a `packages.json' in the `root` directory - directory: "/" - # Check for updates to GitHub Actions every weekday - schedule: - interval: "daily" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ca8d414..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: CI - -# Enable Buildkit and let compose use it to speed up image building -env: - DOCKER_BUILDKIT: 1 - COMPOSE_DOCKER_CLI_BUILD: 1 - -on: - pull_request: - branches: [ "master", "main" ] - paths-ignore: [ "docs/**" ] - - push: - branches: [ "master", "main" ] - paths-ignore: [ "docs/**" ] - -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - linter: - runs-on: ubuntu-latest - steps: - - - name: Checkout Code Repository - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: "3.9" - cache: pip - cache-dependency-path: | - requirements/base.txt - requirements/local.txt - - - name: Run pre-commit - uses: pre-commit/action@v2.0.3 - - # With no caching at all the entire ci process takes 4m 30s to complete! - pytest: - runs-on: ubuntu-latest - - steps: - - - name: Checkout Code Repository - uses: actions/checkout@v3 - - - name: Build the Stack - run: docker-compose -f local.yml build - - - name: Run DB Migrations - run: docker-compose -f local.yml run --rm django python manage.py migrate - - - name: Run Django Tests - run: docker-compose -f local.yml run django pytest - - - name: Tear down the Stack - run: docker-compose -f local.yml down diff --git a/.gitignore b/.gitignore index 3d44978..7e101a6 100644 --- a/.gitignore +++ b/.gitignore @@ -165,7 +165,7 @@ typings/ # Provided default Pycharm Run/Debug Configurations should be tracked by git # In case of local modifications made by Pycharm, use update-index command # for each changed file, like this: -# git update-index --assume-unchanged .idea/pycon_portugal_2022.iml +# git update-index --assume-unchanged .idea/pycon_pt_2022.iml ### JetBrains template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 @@ -323,14 +323,10 @@ Session.vim tags ### Project template -pycon_portugal_2022/media/ +pycon_pt_2022/media/ .pytest_cache/ -.ipython/ project.css project.min.css vendors.js *.min.js -.env -.envs/* -!.envs/.local/ diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index c9ac426..10af178 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,4 @@ - - \ No newline at end of file + diff --git a/.idea/modules.xml b/.idea/modules.xml index a7f13d0..7db1074 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + diff --git a/.idea/pycon_portugal_2022.iml b/.idea/pycon_pt_2022.iml similarity index 85% rename from .idea/pycon_portugal_2022.iml rename to .idea/pycon_pt_2022.iml index 8c67428..2887821 100644 --- a/.idea/pycon_portugal_2022.iml +++ b/.idea/pycon_pt_2022.iml @@ -13,30 +13,33 @@ + - + - + + + - \ No newline at end of file + diff --git a/.idea/runConfigurations/docker_compose_up_django.xml b/.idea/runConfigurations/docker_compose_up_django.xml deleted file mode 100644 index 5c870a7..0000000 --- a/.idea/runConfigurations/docker_compose_up_django.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/.idea/runConfigurations/docker_compose_up_docs.xml b/.idea/runConfigurations/docker_compose_up_docs.xml deleted file mode 100644 index 0f77b28..0000000 --- a/.idea/runConfigurations/docker_compose_up_docs.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml b/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml index 38a55fc..057e708 100644 --- a/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml +++ b/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml @@ -1,6 +1,6 @@ - +