Skip to content

Commit 24fbe86

Browse files
fix dockerfile, unfortunately ballooned the size
1 parent 65e4cc7 commit 24fbe86

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM python:alpine
22

3-
RUN apk update && apk add --no-cache ffmpeg
4-
RUN pip3 install flask flask-restful feedparser requests pygeocodio yt-dlp podgen
3+
RUN apk update && apk add --no-cache ffmpeg poetry
4+
WORKDIR /app
55
COPY . /app
6-
ENTRYPOINT ["python3", "/app/src/ethancedwards_api.py"]
6+
RUN poetry install
7+
ENTRYPOINT ["poetry", "run", "start"]

ethancedwards_api/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
#!/usr/bin/env python3
22

3-
from ethancedwards_api.server import main
4-
5-
print(__name__)
6-
7-
main()
3+
from ethancedwards_api.server import *

ethancedwards_api/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
from ethancedwards_api.server import *
44

5-
main()
5+
if __name__ == '__main__':
6+
main()

ethancedwards_api/server.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ def after_request(response):
4040
api.add_resource(AudioFeed, "/audiofeed/v1")
4141

4242
app.run(host='0.0.0.0', port=(8000 if DEV else 80))
43+
44+
if __name__ == '__main__':
45+
main()

0 commit comments

Comments
 (0)