A .dockerignore => .dockerignore +8 -0
@@ 0,0 1,8 @@
+.git/
+*.egg-info
+*.egg/
+*.pyc
+*.swp
+__pycache__
+*.un~
+.venv/
M Dockerfile => Dockerfile +12 -10
@@ 1,20 1,22 @@
-FROM alpine:latest
+FROM python:3.7-alpine as python-base
MAINTAINER Spencer Julian <hellothere@spencerjulian.com>
+RUN apk add --no-cache --update curl wget build-base libffi-dev openssl-dev
+COPY requirements.txt /tmp
+RUN pip install -U 'pip<10'
+RUN pip wheel --wheel-dir=/root/wheels -r /tmp/requirements.txt
-RUN apk update \
- && apk upgrade \
- && apk add --update curl wget bash ruby ruby-bundler python3 python3-dev py3-pip dumb-init musl linux-headers build-base libffi-dev openssl-dev ruby-rdoc ruby-irb\
- && rm -rf /var/cache/apk/* \
- && mkdir /geemusic
+FROM python:3.7-alpine
+COPY --from=python-base /root/wheels /root/wheels
+RUN apk --no-cache add --update ruby ruby-bundler ruby-rdoc libffi openssl && \
+gem install foreman && \
+pip install -U 'pip<10' && \
+pip install --no-index --find-links=/root/wheels /root/wheels/* && \
+rm -rf /root/wheels
COPY . /geemusic
WORKDIR /geemusic
-RUN pip3 install -U 'pip<10' && pip3 install -r requirements.txt \
- && gem install foreman
-
EXPOSE 5000
# Make sure to run with the GOOGLE_EMAIL, GOOGLE_PASSWORD, and APP_URL environment vars!
-ENTRYPOINT ["/usr/bin/dumb-init"]
CMD ["foreman", "start"]
M README.md => README.md +2 -2
@@ 146,11 146,11 @@ See the note at the top about supported languages.
#### US English users
-On the "Interaction Model" step, paste in the contents of `speech_assets/interactionModel.json` to the JSON Editor.
+On the "Interaction Model" step, paste in the contents of [`speech_assets/interactionModel.json`](https://raw.githubusercontent.com/stevenleeg/geemusic/master/speech_assets/interactionModel.json) to the JSON Editor.
#### Other language users
-On the "Interaction Model" step, paste in the contents of `speech_assets/non_us_custom_slot_version/interactionModel.json` to the JSON Editor.
+On the "Interaction Model" step, paste in the contents of [`speech_assets/non_us_custom_slot_version/interactionModel.json`](https://raw.githubusercontent.com/stevenleeg/geemusic/master/speech_assets/non_us_custom_slot_version/interactionModel.json) to the JSON Editor.
### Configuration
M geemusic/intents/selection.py => geemusic/intents/selection.py +4 -1
@@ 37,7 37,10 @@ def play_artist(artist_name):
# Get a streaming URL for the top song
stream_url = api.get_stream_url(first_song_id)
- thumbnail = api.get_thumbnail(artist['artistArtRef'])
+ if "artistArtRef" in artist:
+ thumbnail = api.get_thumbnail(artist['albumArtRef'])
+ else:
+ thumbnail = None
if api.use_store:
speech_text = render_template("play_artist_text", artist=artist['name'])
else: