Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
@@ -41,7 +41,14 @@ COPY --from=builder /usr/local /usr/local
|
|
41 |
COPY ./ .
|
42 |
|
43 |
# Start Redis server and PostgreSQL in the background
|
44 |
-
RUN service redis-server start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
# Install additional Python dependencies
|
47 |
#RUN pip install -U -q pyngrok ipython psycopg2 alembic
|
|
|
41 |
COPY ./ .
|
42 |
|
43 |
# Start Redis server and PostgreSQL in the background
|
44 |
+
RUN service redis-server start \
|
45 |
+
&& service postgresql start \
|
46 |
+
&& su -u postgres psql -c "CREATE USER postadmin WITH PASSWORD 'postpass';" \
|
47 |
+
&& su -u postgres psql -c "CREATE DATABASE siksalaya;" \
|
48 |
+
&& su -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE sikshyalaya TO postadmin;"
|
49 |
+
|
50 |
+
# Switch back to a non-root user for security
|
51 |
+
USER appuser
|
52 |
|
53 |
# Install additional Python dependencies
|
54 |
#RUN pip install -U -q pyngrok ipython psycopg2 alembic
|