132ikl / liteshort

[MOVED] User-friendly, actually lightweight, and configurable URL shortener
https://ls.ikl.sh
MIT License
60 stars 7 forks source link

Adding a Dockerfile #26

Open guidopetri opened 2 years ago

guidopetri commented 2 years ago

Hey, I didn't want to register under my real email address on Gitea, sorry.

I wrote a short Dockerfile which seems to do the job for hosting this:

FROM python:3.10-alpine

RUN apk update && apk add uwsgi uwsgi-python3 gcc musl-dev libffi-dev
RUN pip install liteshort requests MarkupSafe==2.0.1

EXPOSE 5000

ENTRYPOINT ["liteshort"]

Note that MarkupSafe has to be version-pinned there because of the removal of soft_unicode (source).

132ikl commented 2 years ago

It would probably be wiser for me to add a requirements.txt and pin the MarkupSafe version there, which would allow the pip line to just be pip install liteshort. I have no idea why I didn't use that in the first place.

132ikl commented 2 years ago

I'll take a look into integrating this but be warned that it will probably take a while since right now I have COVID and generally this project is on the backburner for me anyway.

guidopetri commented 2 years ago

Oh no worries, it was more of a "since I already wrote it, let me share it" kind of thing. Take your time, the software is stable. Hope you feel better soon.