|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
FROM python:3.8-bullseye
|
|
|
|
|
|
|
|
|
|
COPY . /app/geodata
|
|
|
|
|
COPY ./requirements.txt /app/requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
|
@ -11,6 +11,8 @@ RUN pip install gunicorn uvicorn
|
|
|
|
|
RUN curl --location https://raw.githubusercontent.com/vishnubob/wait-for-it/81b1373f17855a4dc21156cfe1694c31d7d1792e/wait-for-it.sh > /usr/bin/wait-for-it \
|
|
|
|
|
&& chmod +x /usr/bin/wait-for-it
|
|
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
@ -18,7 +20,7 @@ WORKDIR /app
|
|
|
|
|
CMD [ \
|
|
|
|
|
"/usr/bin/wait-for-it", "postgres:5432", "--timeout=45", "--strict", \
|
|
|
|
|
"--", \
|
|
|
|
|
"sh", "-c" \
|
|
|
|
|
"sh", "-c", \
|
|
|
|
|
# might use exact migration hash here instead of upgrading to the latest "heads"
|
|
|
|
|
"alembic upgrade heads \
|
|
|
|
|
&& \
|
|
|
|
|
|