Skip to content

Commit

Permalink
intermediate
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick committed Jun 16, 2024
1 parent 29467b2 commit 6fe3754
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea/
.env
.env
/app/__pycache__
16 changes: 5 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
FROM python:3.12-slim-bookworm
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-alpine

RUN apt-get update
RUN apt-get install -y --no-install-recommends curl
RUN apt-get clean

RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python
RUN cd /usr/local/bin
RUN ln -s /opt/poetry/bin/poetry
RUN poetry config virtualenvs.create false
RUN apk add libxml2-dev libxslt-dev cargo

WORKDIR /app
COPY ./pyproject.toml ./poetry.lock* ./
COPY ./requirements.txt /tmp/
COPY ./app ./

RUN poetry install --no-root --no-dev --no-interaction
RUN pip install -r /tmp/requirements.txt

ENV TZ=Europe/Amsterdam
ENV PYTHONUNBUFFERED=1
Expand Down
2 changes: 1 addition & 1 deletion app/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
version: '3'
services:
sonos-display:
image: rule88/sonos-display
restart: unless-stopped
network_mode: "host"
environment:
- PORT=${PORT}
- SPEAKER_NAME=${SPEAKER_NAME}
- SPEAKER_NAME=${SPEAKER_NAME}
22 changes: 22 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
annotated-types==0.7.0
appdirs==1.4.4
blinker==1.8.2
cachetools==5.3.3
certifi==2024.6.2
charset-normalizer==3.3.2
click==8.1.7
Flask==3.0.3
idna==3.7
ifaddr==0.2.0
itsdangerous==2.2.0
Jinja2==3.1.4
lxml==5.2.2
MarkupSafe==2.1.5
pydantic==2.7.4
pydantic_core==2.18.4
requests==2.32.3
soco==0.30.4
typing_extensions==4.12.2
urllib3==2.2.1
Werkzeug==3.0.3
xmltodict==0.13.0

0 comments on commit 6fe3754

Please sign in to comment.