granian-restart
Some checks failed
deploy / deploy (push) Failing after 1m12s

This commit is contained in:
Untone 2024-02-04 07:12:20 +03:00
parent 59a1f8c902
commit f8e12146be
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ FROM python:slim
WORKDIR /app
# Add metadata to the image to describe that the container is listening on port 80
EXPOSE 80
EXPOSE 8000
# Copy the current directory contents into the container at /app
COPY . /app
@ -19,4 +19,4 @@ RUN apt-get update && apt-get install -y gcc curl && \
poetry install --no-dev
# Run server.py when the container launches
CMD granian --no-ws --host 0.0.0.0 --port 80 --interface asgi main:app
CMD granian --no-ws --host 0.0.0.0 --port 8000 --interface asgi main:app

View File

@ -1,7 +1,7 @@
from os import environ
PORT = 80
PORT = 8000
DB_URL = (
environ.get('DATABASE_URL', environ.get('DB_URL', '')).replace('postgres://', 'postgresql://')
or 'postgresql://postgres@localhost:5432/discoursio'