fixed some bugs that i found when deploying
This commit is contained in:
parent
e69ec565f7
commit
022f41a883
@ -4,8 +4,6 @@ FROM python:3.12.2-slim-bookworm
|
||||
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
|
||||
RUN groupadd -r app && useradd -r -g app app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN python3 -m pip install --upgrade pip
|
||||
@ -13,6 +11,4 @@ RUN python3 -m pip install -r requirements.txt
|
||||
|
||||
WORKDIR ./app
|
||||
|
||||
USER app
|
||||
|
||||
CMD ["python3", "-u", "app.py"]
|
||||
|
||||
@ -20,7 +20,7 @@ class Post:
|
||||
self.category = lines[1].split(":")[1].strip()
|
||||
self.author = lines[2].split(":")[1].strip()
|
||||
self.title = lines[6].replace('#', '').strip()
|
||||
self.url = '/post/' + self.title.replace(' ', '-')
|
||||
self.url = '/post/' + self.title
|
||||
|
||||
date = lines[3].split(":")[1].strip()
|
||||
self.date = datetime.datetime.strptime(date, "%d-%m-%Y")
|
||||
|
||||
@ -50,7 +50,7 @@ def add_user():
|
||||
with open(USERS_PATH, 'w') as file:
|
||||
file.write(json.dumps(user_data))
|
||||
|
||||
flask.redirect('/')
|
||||
return flask.redirect('/')
|
||||
|
||||
@user.route('/user/register/')
|
||||
def register_page():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user