Skip to content

Commit

Permalink
Update dockerization
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Sep 11, 2024
1 parent 279f600 commit 07ee0de
Show file tree
Hide file tree
Showing 12 changed files with 393 additions and 89 deletions.
16 changes: 12 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
tab_width = 2
indent_size = 2
indent_style = space
indent_size = 4
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[{*.py,*.pyw,Dockerfile,Dockerfile.dev}]
tab_width = 4
indent_size = 4

[Makefile]
indent_style = tab

[{*.iml,*.xml,*.yml,*.yaml}]
indent_size = 2

[*.csv]
insert_final_newline = false
46 changes: 10 additions & 36 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,14 @@ on:
name: Build Docker image

jobs:
build-docker-image:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: code4romania/paul
tags: |
type=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build:
name: Build Docker image
uses: code4romania/.github/.github/workflows/build-push-image.yml@main
with:
images: code4romania/paul
context: ./
dockerfile: ./docker/dockerfiles/Dockerfile
secrets:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ node_modules
dist

# local env files
.env.local
.env.*.local
.env
.env.*
!.env*.example

# Log files
npm-debug.log*
Expand Down
7 changes: 7 additions & 0 deletions backend/requirements-dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pip-tools~=7.4.1

# formatting & linting
black~=24.8.0
ruff~=0.6.3

-r requirements.txt
198 changes: 192 additions & 6 deletions backend/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,193 @@
pip-tools~=7.4.1
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements-dev.txt --strip-extras requirements-dev.in
#
asgiref==3.8.1
# via
# -r requirements.txt
# django
black==24.8.0
# via -r requirements-dev.in
blessed==1.20.0
# via -r requirements.txt
boto3==1.35.16
# via
# -r requirements.txt
# django-ses
# pycognito
botocore==1.35.16
# via
# -r requirements.txt
# boto3
# s3transfer
build==1.2.2
# via pip-tools
certifi==2024.8.30
# via
# -r requirements.txt
# requests
# sentry-sdk
cffi==1.17.1
# via
# -r requirements.txt
# cryptography
# python-fossil-delta
charset-normalizer==3.3.2
# via
# -r requirements.txt
# requests
click==8.1.7
# via
# black
# pip-tools
croniter==3.0.3
# via -r requirements.txt
cryptography==43.0.1
# via
# -r requirements.txt
# pyjwt
django==5.1.1
# via
# -r requirements.txt
# django-allauth
# django-picklefield
# django-q2
# django-ses
# django-storages
# django-unfold
django-allauth==64.2.1
# via -r requirements.txt
django-environ==0.11.2
# via -r requirements.txt
django-picklefield==3.2
# via
# -r requirements.txt
# django-q2
django-q2==1.7.2
# via -r requirements.txt
django-ses==4.1.1
# via -r requirements.txt
django-storages==1.14.4
# via -r requirements.txt
django-unfold==0.38.0
# via -r requirements.txt
envs==1.4
# via
# -r requirements.txt
# pycognito
gevent==24.2.1
# via -r requirements.txt
greenlet==3.1.0
# via
# -r requirements.txt
# gevent
gunicorn==23.0.0
# via -r requirements.txt
idna==3.8
# via
# -r requirements.txt
# requests
jmespath==1.0.1
# via
# -r requirements.txt
# boto3
# botocore
mypy-extensions==1.0.0
# via black
oauthlib==3.2.2
# via
# -r requirements.txt
# requests-oauthlib
packaging==24.1
# via
# -r requirements.txt
# black
# build
# gunicorn
pathspec==0.12.1
# via black
pip-tools==7.4.1
# via -r requirements-dev.in
platformdirs==4.3.2
# via black
psutil==6.0.0
# via -r requirements.txt
psycopg2-binary==2.9.9
# via -r requirements.txt
pycognito==2024.5.1
# via -r requirements.txt
pycparser==2.22
# via
# -r requirements.txt
# cffi
pyjwt==2.9.0
# via
# -r requirements.txt
# pycognito
pyproject-hooks==1.1.0
# via
# build
# pip-tools
python-dateutil==2.9.0.post0
# via
# -r requirements.txt
# botocore
# croniter
python-fossil-delta==18.11.27
# via -r requirements.txt
pytz==2024.2
# via
# -r requirements.txt
# croniter
requests==2.32.3
# via
# -r requirements.txt
# pycognito
# requests-oauthlib
requests-oauthlib==2.0.0
# via -r requirements.txt
ruff==0.6.4
# via -r requirements-dev.in
s3transfer==0.10.2
# via
# -r requirements.txt
# boto3
sentry-sdk==2.14.0
# via -r requirements.txt
six==1.16.0
# via
# -r requirements.txt
# blessed
# python-dateutil
sqlparse==0.5.1
# via
# -r requirements.txt
# django
urllib3==2.2.2
# via
# -r requirements.txt
# botocore
# requests
# sentry-sdk
wcwidth==0.2.13
# via
# -r requirements.txt
# blessed
wheel==0.44.0
# via pip-tools
whitenoise==6.7.0
# via -r requirements.txt
zope-event==5.0
# via
# -r requirements.txt
# gevent
zope-interface==7.0.3
# via
# -r requirements.txt
# gevent

# formatting & linting
black~=24.8.0
ruff~=0.6.3

-r requirements.txt
# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
33 changes: 33 additions & 0 deletions backend/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# django and related
django~=5.1.1
django-allauth[socialaccount]~=64.2.0
django-environ~=0.11.2
django-unfold~=0.38.0

# job scheduler
django-q2~=1.7.2
blessed~=1.20.0 # optional requirement for django-q2
psutil~=6.0.0 # optional requirement for django-q2
croniter~=3.0.3 # optional requirement for django-q2

# file handling
django-storages[s3]~=1.14.4
whitenoise~=6.7.0

# emails
django-ses~=4.1.1

# misc
requests~=2.32.3
python-fossil-delta==18.11.27

# Temporary dependency until we finish the `ngohub` package
pycognito~=2024.5.1

# database
psycopg2-binary~=2.9.9

# prod packages
gunicorn~=23.0.0
gevent~=24.2.1
sentry-sdk[django]~=2.14.0
Loading

0 comments on commit 07ee0de

Please sign in to comment.