Skip to content

Commit

Permalink
update the ci to include docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanehachcham committed Oct 27, 2023
1 parent aa6312e commit 98a85b2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest]
python-version: ['3.10', '3.11']

steps:
- name: Checkout code
Expand Down
25 changes: 16 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@ FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

ENV PYTHONPATH=${PYTHONPATH}:${PWD}

# Install required system dependencies
RUN pip3 install poetry
RUN pip install poetry

# Configure the virtual env to be created in the project directory
RUN poetry config virtualenvs.create true \
&& poetry config virtualenvs.in-project true

# Install Python dependencies using poetry
RUN poetry config virtualenvs.create false
COPY pyproject.toml poetry.lock ./

RUN poetry install --no-interaction \
--no-ansi \
--without docs
--without docs \

# Modify PATH to use poetry's virtual environment
ENV PATH="/app/.venv/bin:$PATH"

# Copy the current directory contents into the container at /app
COPY . /app

# Update the PYTHON PATH
ENV PYTHONPATH=${PYTHONPATH}:${PWD}

# Specify the command to run on container start
CMD ["python3", "main.py"]

0 comments on commit 98a85b2

Please sign in to comment.