|
|
|
|
@ -18,9 +18,10 @@ WORKDIR /app
|
|
|
|
|
CMD [ \
|
|
|
|
|
"/usr/bin/wait-for-it", "postgres:5432", "--timeout=45", "--strict", \
|
|
|
|
|
"--", \
|
|
|
|
|
"sh", "-c" \
|
|
|
|
|
# might use exact migration hash here instead of upgrading to the latest "heads"
|
|
|
|
|
"alembic", "upgrade", "heads", \
|
|
|
|
|
"&&", \
|
|
|
|
|
"gunicorn", "--workers=2", "--worker-class=uvicorn.workers.UvicornWorker", "--bind=0.0.0.0:8000", \
|
|
|
|
|
"geodata.main:app", "--root-path=/api/v1" \
|
|
|
|
|
"alembic upgrade heads \
|
|
|
|
|
&& \
|
|
|
|
|
gunicorn --workers=2 --worker-class=uvicorn.workers.UvicornWorker --bind=0.0.0.0:8000 \
|
|
|
|
|
geodata.main:app --root-path=/api/v1" \
|
|
|
|
|
]
|
|
|
|
|
|