Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -50,9 +50,9 @@ USER appuser
|
|
50 |
#RUN pip install -U -q pyngrok ipython psycopg2 alembic
|
51 |
|
52 |
# Create PostgreSQL users and databases in the background
|
53 |
-
RUN
|
54 |
-
RUN
|
55 |
-
RUN
|
56 |
|
57 |
# Start the FastAPI app using Uvicorn
|
58 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
50 |
#RUN pip install -U -q pyngrok ipython psycopg2 alembic
|
51 |
|
52 |
# Create PostgreSQL users and databases in the background
|
53 |
+
RUN sudo -c "psql -c \"CREATE USER postadmin WITH PASSWORD 'postpass';\"" postgres &
|
54 |
+
RUN sudo -c "psql -c \"CREATE DATABASE siksalaya;\"" postgres &
|
55 |
+
RUN sudo -c "psql -c \"GRANT ALL PRIVILEGES ON DATABASE sikshyalaya TO postadmin;\"" postgres &
|
56 |
|
57 |
# Start the FastAPI app using Uvicorn
|
58 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|