Skip to content

Commit ca09630

Browse files
committed
Improving Dockerfile and docs
1 parent 19f751a commit ca09630

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

{{cookiecutter.project_slug}}/Dockerfile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
ARG BUILDPLATFORM=linux/amd64
22
ARG BUILDTAG=3-alpine
33

4-
FROM --platform=$BUILDPLATFORM python:$BUILDTAG as base_build
4+
FROM --platform=$BUILDPLATFORM python:$BUILDTAG as test
55

66
WORKDIR /home/user/app
77

8-
COPY {{cookiecutter.package_name}} {{cookiecutter.package_name}}
9-
COPY tests tests
8+
ENV PATH=$PATH:/home/user/.local/bin
9+
10+
RUN pip install --no-cache poetry poethepoet
11+
RUN poetry config --no-cache
1012
COPY pyproject.toml .
1113
COPY poetry.lock .
12-
COPY README.md .
14+
RUN poetry install --no-root
15+
1316
COPY .pre-commit-config.yaml .
14-
COPY .gitignore .
1517
COPY .flake8 .
18+
COPY README.md .
19+
COPY features features
20+
COPY {{cookiecutter.package_name}} {{cookiecutter.package_name}}
21+
COPY tests tests
1622

17-
ENV PATH=$PATH:/home/user/.local/bin
23+
RUN poetry install
1824

19-
FROM base_build as test
25+
RUN poetry build --format=wheel
26+
RUN poetry export --only main -f requirements.txt --without-hashes --output requirements.txt
2027

2128
ARG TESTBUILD=True
2229
ENV TESTBUILD=$TESTBUILD
23-
24-
RUN pip install --no-cache poetry poethepoet
25-
RUN poetry config --no-cache
26-
RUN poe install-dev
27-
RUN poetry build --format=wheel
28-
RUN poetry export --only main -f requirements.txt --without-hashes --output requirements.txt
2930
RUN if [ "$TESTBUILD" = 'True' ]; then poe test; fi
3031

3132
ENTRYPOINT ["poe", "-q"]

{{cookiecutter.project_slug}}/docs/mkdocs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ plugins:
1717
theme:
1818
name: material
1919
palette:
20-
- media: '(prefers-color-scheme: dark)'
20+
- media: '(prefers-color-scheme: light)'
2121
scheme: slate
2222
primary: blue
2323
accent: amber
2424
toggle:
2525
icon: material/lightbulb-outline
2626
name: Switch to light mode
27-
- media: '(prefers-color-scheme: light)'
27+
- media: '(prefers-color-scheme: dark)'
2828
scheme: default
2929
primary: black
3030
accent: amber
@@ -44,8 +44,8 @@ theme:
4444

4545
nav:
4646
- index.md
47-
- ... | readme.md
48-
- ... | scenarios/**/*.md
47+
- ... | glob=readme.md
48+
- ... | regex=scenarios/.+.md
4949
- API: mkapi/api/{{cookiecutter.package_name}}
5050
- Tests: mkapi/tests/tests
5151

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""{{cookiecutter.project_short_description}}"""
1+
"""{{cookiecutter.project_short_description}}."""

0 commit comments

Comments
 (0)