Skip to content

Commit 0424a3c

Browse files
committed
upgrade pythin to 3.11 and add export plugin for poetry
1 parent 4141f2a commit 0424a3c

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10
1+
3.11

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
ARG APP_NAME=pyth-observer
44
ARG APP_PACKAGE=pyth_observer
55
ARG APP_PATH=/opt/$APP_NAME
6-
ARG PYTHON_VERSION=3.10.4
6+
ARG PYTHON_VERSION=3.11
77
ARG POETRY_VERSION=2.1.4
88

99
#
1010
# Stage: base
1111
#
1212

13-
FROM python:$PYTHON_VERSION as base
13+
FROM python:$PYTHON_VERSION AS base
1414

1515
ARG APP_NAME
1616
ARG APP_PATH
@@ -27,8 +27,9 @@ ENV \
2727
POETRY_NO_INTERACTION=1
2828

2929
# Install Poetry - respects $POETRY_VERSION & $POETRY_HOME
30-
RUN curl -sSL https://install.python-poetry.org | python
30+
RUN curl -sSL https://install.python-poetry.org | python - --version $POETRY_VERSION
3131
ENV PATH="$POETRY_HOME/bin:$PATH"
32+
RUN which poetry && poetry --version
3233

3334
WORKDIR $APP_PATH
3435
COPY . .
@@ -37,7 +38,7 @@ COPY . .
3738
# Stage: development
3839
#
3940

40-
FROM base as development
41+
FROM base AS development
4142

4243
ARG APP_NAME
4344
ARG APP_PATH
@@ -54,7 +55,7 @@ CMD ["$APP_NAME"]
5455
# Stage: build
5556
#
5657

57-
FROM base as build
58+
FROM base AS build
5859

5960
ARG APP_NAME
6061
ARG APP_PATH
@@ -67,7 +68,7 @@ RUN poetry export --format requirements.txt --output constraints.txt --without-h
6768
# Stage: production
6869
#
6970

70-
FROM python:$PYTHON_VERSION as production
71+
FROM python:$PYTHON_VERSION AS production
7172

7273
ARG APP_NAME
7374
ARG APP_PATH

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.mypy]
2-
python_version = "3.10"
2+
python_version = "3.11"
33
ignore_missing_imports = true
44

55
[tool.poetry]
@@ -48,3 +48,6 @@ pyth-observer = "pyth_observer.cli:run"
4848
[build-system]
4949
requires = ["poetry-core"]
5050
build-backend = "poetry.core.masonry.api"
51+
52+
[tool.poetry.requires-plugins]
53+
poetry-plugin-export = ">=1.8"

0 commit comments

Comments
 (0)