ashwinR commited on
Commit
0c29cc6
·
1 Parent(s): a99c9be

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 su -c "psql -c \"CREATE USER postadmin WITH PASSWORD 'postpass';\"" postgres &
54
- RUN su -c "psql -c \"CREATE DATABASE siksalaya;\"" postgres &
55
- RUN su -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"]
 
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"]