Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
omargawdat committed Feb 26, 2025
0 parents commit e5c2986
Show file tree
Hide file tree
Showing 126 changed files with 3,507 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.editorconfig
.gitattributes
.github
.gitignore
.gitlab-ci.yml
.idea
.pre-commit-config.yaml
.readthedocs.yml
.travis.yml
venv
.git
old.envs/
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,rst,ini}]
indent_style = space
indent_size = 4

[*.{html,css,scss,json,yml,xml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab

[default.conf]
indent_style = space
indent_size = 2
82 changes: 82 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
version: 2
updates:
# Update GitHub actions in workflows
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "ci"
include: "scope"
open-pull-requests-limit: 10
groups:
github-actions:
patterns:
- "*"

# Enable version updates for Docker
- package-ecosystem: 'docker'
directories:
- 'compose/local/django/'
- 'compose/local/docs/'
- 'compose/prod/aws/'
- 'compose/prod/django/'
- 'compose/prod/postgres/'
- 'compose/prod/traefik/'
schedule:
interval: 'monthly'
labels:
- "dependencies"
- "docker"
commit-message:
prefix: "docker"
include: "scope"
open-pull-requests-limit: 5
groups:
django-dependencies:
patterns:
- "compose/local/django/*"
docs-dependencies:
patterns:
- "compose/local/docs/*"
node-dependencies:
patterns:
- "compose/local/node/*"
aws-dependencies:
patterns:
- "compose/prod/aws/*"
django-prod-dependencies:
patterns:
- "compose/prod/django/*"
postgres-dependencies:
patterns:
- "compose/prod/postgres/*"
traefik-dependencies:
patterns:
- "compose/prod/traefik/*"
ignore:
- dependency-name: '*'
update-types:
- 'version-update:semver-major'
- 'version-update:semver-minor'

# Enable version updates for Python/Pip - Production
- package-ecosystem: 'pip'
directory: '/'
schedule:
interval: 'monthly'
labels:
- "dependencies"
- "python"
commit-message:
prefix: "deps"
prefix-development: "dev-deps"
include: "scope"
open-pull-requests-limit: 10
groups:
python-dependencies:
patterns:
- "*"
21 changes: 21 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI
on:
pull_request:
branches: [ 'master', 'main' ]
paths-ignore: [ 'docs/**' ]

push:
branches: [ 'master', 'main' ]
paths-ignore: [ 'docs/**' ]

env:
AWS_SECRETS_REGION: ${{ secrets.AWS_SECRETS_REGION }}
AWS_SECRET_ID: ${{ secrets.AWS_SECRET_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

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@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Run pre-commit
uses: pre-commit/[email protected]

pytest:
runs-on: ubuntu-latest
env:
AWS_SECRETS_REGION: ${{ secrets.AWS_SECRETS_REGION }}
AWS_SECRET_ID: ${{ secrets.AWS_SECRET_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
steps:
- name: Checkout Code Repository
uses: actions/checkout@v4

- name: Build the Stack
run: docker compose -f docker-compose.local.yml build django

- name: Check DB Migrations
run: docker compose -f docker-compose.local.yml run --rm django python manage.py makemigrations --check

- name: Run DB Migrations
run: docker compose -f docker-compose.local.yml run --rm django python manage.py migrate

- name: Run Django Tests
run: docker compose -f docker-compose.local.yml run django pytest

- name: Tear down the Stack
run: docker compose -f docker-compose.local.yml down
153 changes: 153 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Development Environments & IDEs
#-------------------------------
# VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# JetBrains IDEs
.idea/
*.iws
out/
.idea_modules/
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/gradle.xml
.idea/**/libraries
.idea/**/mongoSettings.xml
.idea/replstate.xml
.idea/dictionaries

# Vim
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
Session.vim
.netrwhist
tags

# Python
#-------
# Byte-compiled / optimized files
__pycache__/
*.py[cod]
*$py.class
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Testing and Coverage
.pytest_cache/
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Operating System
#----------------
# macOS
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop

# Windows
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
*.stackdump
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
*.lnk

# Linux
*~
.fuse_hidden*
.directory
.Trash-*
.nfs*

# Project Specific
----------------
# Infrastructure
**/.terraform/*
*.tfstate
*.tfstate.*
override.tf
override.tf.json
*_override.tf
*_override.tf.json
.terraformrc
terraform.rc
.ipython/

# Security and Credentials
firebase_cred.json
*.pem
*.key
*.crt

# Django
staticfiles/

Documentation
docs/_build/
/site

# Other
assets/media/
dump.rdb
.devcontainer/bash_history
docker-compose.prod.yml

# Environments
#.env.local
.envs/*
!.envs/.example/
.env
Loading

0 comments on commit e5c2986

Please sign in to comment.