Skip to content

Commit be1bc48

Browse files
committed
first commit
0 parents  commit be1bc48

File tree

307 files changed

+28817
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

307 files changed

+28817
-0
lines changed

.dockerignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.editorconfig
2+
.gitattributes
3+
.github
4+
.gitignore
5+
.gitlab-ci.yml
6+
.idea
7+
.pre-commit-config.yaml
8+
.readthedocs.yml
9+
.travis.yml
10+
venv

.editorconfig

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{py,rst,ini}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.{html,css,scss,json,yml,xml}]
16+
indent_style = space
17+
indent_size = 2
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
[Makefile]
23+
indent_style = tab
24+
25+
[nginx.conf]
26+
indent_style = space
27+
indent_size = 2

.envs/.local/.django

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# General
2+
# ------------------------------------------------------------------------------
3+
USE_DOCKER=yes
4+
IPYTHONDIR=/app/.ipython

.envs/.local/.postgres

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PostgreSQL
2+
# ------------------------------------------------------------------------------
3+
POSTGRES_HOST=postgres
4+
POSTGRES_PORT=5432
5+
POSTGRES_DB=pycon_portugal_2023
6+
POSTGRES_USER=waUusthnAqRXFjjdFNPRukoVtTQEzVEs
7+
POSTGRES_PASSWORD=7pbeTdim4Sr3ehM8mNKdGgxsQOv8Esho1tfwQaYsAYCfGGD6CbKSklFKwY8LYJI6

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/dependabot.yml

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Config for Dependabot updates. See Documentation here:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
# Update GitHub actions in workflows
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
# Check for updates to GitHub Actions every weekday
10+
schedule:
11+
interval: "daily"
12+
13+
# Enable version updates for Docker
14+
# We need to specify each Dockerfile in a separate entry because Dependabot doesn't
15+
# support wildcards or recursively checking subdirectories. Check this issue for updates:
16+
# https://github.com/dependabot/dependabot-core/issues/2178
17+
- package-ecosystem: "docker"
18+
# Look for a `Dockerfile` in the `compose/local/django` directory
19+
directory: "compose/local/django/"
20+
# Check for updates to GitHub Actions every weekday
21+
schedule:
22+
interval: "daily"
23+
24+
# Enable version updates for Docker
25+
- package-ecosystem: "docker"
26+
# Look for a `Dockerfile` in the `compose/local/docs` directory
27+
directory: "compose/local/docs/"
28+
# Check for updates to GitHub Actions every weekday
29+
schedule:
30+
interval: "daily"
31+
32+
# Enable version updates for Docker
33+
- package-ecosystem: "docker"
34+
# Look for a `Dockerfile` in the `compose/local/node` directory
35+
directory: "compose/local/node/"
36+
# Check for updates to GitHub Actions every weekday
37+
schedule:
38+
interval: "daily"
39+
40+
# Enable version updates for Docker
41+
- package-ecosystem: "docker"
42+
# Look for a `Dockerfile` in the `compose/production/aws` directory
43+
directory: "compose/production/aws/"
44+
# Check for updates to GitHub Actions every weekday
45+
schedule:
46+
interval: "daily"
47+
48+
# Enable version updates for Docker
49+
- package-ecosystem: "docker"
50+
# Look for a `Dockerfile` in the `compose/production/django` directory
51+
directory: "compose/production/django/"
52+
# Check for updates to GitHub Actions every weekday
53+
schedule:
54+
interval: "daily"
55+
56+
# Enable version updates for Docker
57+
- package-ecosystem: "docker"
58+
# Look for a `Dockerfile` in the `compose/production/postgres` directory
59+
directory: "compose/production/postgres/"
60+
# Check for updates to GitHub Actions every weekday
61+
schedule:
62+
interval: "daily"
63+
64+
# Enable version updates for Docker
65+
- package-ecosystem: "docker"
66+
# Look for a `Dockerfile` in the `compose/production/traefik` directory
67+
directory: "compose/production/traefik/"
68+
# Check for updates to GitHub Actions every weekday
69+
schedule:
70+
interval: "daily"
71+
72+
# Enable version updates for Python/Pip - Production
73+
- package-ecosystem: "pip"
74+
# Look for a `requirements.txt` in the `root` directory
75+
# also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt'
76+
directory: "/"
77+
# Check for updates to GitHub Actions every weekday
78+
schedule:
79+
interval: "daily"
80+
81+
# Enable version updates for javascript/npm
82+
- package-ecosystem: "npm"
83+
# Look for a `packages.json' in the `root` directory
84+
directory: "/"
85+
# Check for updates to GitHub Actions every weekday
86+
schedule:
87+
interval: "daily"

.github/workflows/ci.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
# Enable Buildkit and let compose use it to speed up image building
4+
env:
5+
DOCKER_BUILDKIT: 1
6+
COMPOSE_DOCKER_CLI_BUILD: 1
7+
8+
on:
9+
pull_request:
10+
branches: [ "master", "main" ]
11+
paths-ignore: [ "docs/**" ]
12+
13+
push:
14+
branches: [ "master", "main" ]
15+
paths-ignore: [ "docs/**" ]
16+
17+
concurrency:
18+
group: ${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
linter:
23+
runs-on: ubuntu-latest
24+
steps:
25+
26+
- name: Checkout Code Repository
27+
uses: actions/checkout@v3
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v3
31+
with:
32+
python-version: "3.9"
33+
cache: pip
34+
cache-dependency-path: |
35+
requirements/base.txt
36+
requirements/local.txt
37+
38+
- name: Run pre-commit
39+
uses: pre-commit/[email protected]
40+
41+
# With no caching at all the entire ci process takes 4m 30s to complete!
42+
pytest:
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
47+
- name: Checkout Code Repository
48+
uses: actions/checkout@v3
49+
50+
- name: Build the Stack
51+
run: docker-compose -f local.yml build
52+
53+
- name: Run DB Migrations
54+
run: docker-compose -f local.yml run --rm django python manage.py migrate
55+
56+
- name: Run Django Tests
57+
run: docker-compose -f local.yml run django pytest
58+
59+
- name: Tear down the Stack
60+
run: docker-compose -f local.yml down

0 commit comments

Comments
 (0)