ActivityWatch / ActivityWatch/aw-watcher-spotify

Run inside a container?

Đang mở
#25 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
88
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I want to keep this running constantly on my server, even though it won't be able to save data to the AW server on my machines, I figure I could have a bucket on my server, which gathers all the data, so I can import it to one of my AW servers at any point in time.

Running the container I got this:

```
INFO:spotipy.oauth2:User authentication requires interaction with your web browser. Once you enter your credentials and give authorization, you will be redirected to a url. Paste that url you were directed to to complete the authorization.
INFO:spotipy.oauth2:Opened https://accounts.spotify.com/authorize?client_id=[REDACTED]&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8088&scope=user-read-currently-playing in your
WARNING:aw_client.client:Not connected to server, 0 requests in queue
WARNING:aw_client.client:Not connected to server, 0 requests in queue
```

Any ideas how to implement this correctly? Here are my docker files:

```
version: "3"

services:

watcher-spotify:
build:
context: .
dockerfile: Dockerfile
image: local/aw-spotify:v2023.12
restart: unless-stopped

container_name: watcher-spotify
hostname: watcher-spotify

volumes:
- ./config.toml:/app/.config/activitywatch/aw-watcher-spotify/aw-watcher-spotify.toml

```

```
FROM python:alpine

WORKDIR /app

ARG NAME=container
ARG UID=1050
ARG GID=1050
RUN addgroup --gid $GID $NAME
RUN adduser \
--disabled-password \
--home "$(pwd)" \
--uid $UID \
--ingroup $NAME \
--shell /bin/sh \
"$NAME"
USER $NAME

RUN mkdir -p .config/activitywatch/aw-client

COPY aw-watcher-spotify ./

RUN pip install .

CMD python aw_watcher_spotify/main.py
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.