Skip to content

Commit

Permalink
Merge pull request #35 from Bubhux/development
Browse files Browse the repository at this point in the history
MAJ Test CI/CD
  • Loading branch information
Bubhux authored Jan 19, 2025
2 parents a7c6d49 + 80f30a1 commit e9c1ff5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd_branch_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build_and_test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.10"]
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:

build_and_push_to_dockerhub:
needs: build_and_test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
# deploy_to_heroku:
# needs: build_and_push_to_dockerhub
# runs-on: ubuntu-latest
# runs-on: ubuntu-22.04
#
# steps:
# - name: Checkout code
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Étape 1 : Installation des dépendances de construction
# Utilisation de l'image Python 3.7.2 basée sur Alpine Linux
FROM python:3.7.2-alpine AS builder
FROM python:3.10-alpine AS builder

# Installation des bibliothèques PostgreSQL
RUN apk add --no-cache postgresql-libs
Expand Down Expand Up @@ -30,7 +30,7 @@ RUN /app/venv/bin/pip install --upgrade pip
RUN /app/venv/bin/pip install -r requirements.txt

# Étape 3 : Construction de l'image finale
FROM python:3.7.2-alpine
FROM python:3.10-alpine

# Configuration du répertoire de travail
WORKDIR /app
Expand All @@ -49,6 +49,10 @@ COPY . /app/

# Copie des dépendances Python de l'étape python-dependencies
COPY --from=python-dependencies /app/venv /app/venv
RUN /app/venv/bin/pip install --upgrade pip
RUN apk del .build-deps
RUN apk add zlib-dev jpeg-dev libjpeg


# Collecte des fichiers statiques de l'application
RUN /app/venv/bin/python manage.py collectstatic --noinput --settings=oc_lettings_site.settings
Expand Down

0 comments on commit e9c1ff5

Please sign in to comment.