diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 80d53cf3f..82fb096a0 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -15,6 +15,13 @@ Contribute * Send a pull request with your changes. * Provide a translation using Transifex_. +Running example app with Docker +---------------------------------- + +Run the example app on port 8000:: + + docker-compose up -d example_app + Running tests ------------- This project aims for full code-coverage, this means that your code should be @@ -32,6 +39,10 @@ covering all supported Python and Django version with:: tox +With docker run tests:: + + docker-compose run --rm cli bash -c "pip install -r requirements_dev.txt; make test" + Releasing --------- The following actions are required to push a new version: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..99eb326ed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3 +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 +WORKDIR /code +COPY requirements_dev.txt /code/ +COPY setup.py /code/ +COPY README.rst /code/ +RUN pip install . +RUN pip install -r requirements_dev.txt +COPY . /code/ +RUN example/manage.py migrate +COPY . /code/ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..875c195ac --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3.9" + +x-base: &base + build: . + command: bash + volumes: + - .:/code + +services: + cli: + <<: *base + example_app: + <<: *base + command: example/manage.py runserver 0.0.0.0:8000 + ports: + - "8000:8000"