Spaces:
Runtime error
Runtime error
TahaRasouli
commited on
Commit
•
53ec6bf
1
Parent(s):
ab8164b
Update Dockerfile
Browse files- Dockerfile +15 -14
Dockerfile
CHANGED
@@ -1,16 +1,17 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
COPY requirements.txt ./requirements.txt
|
4 |
-
RUN apt-get update \
|
5 |
-
&& apt-get -y install libpq-dev gcc \
|
6 |
-
&& pip install psycopg2
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
|
12 |
-
#
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
1 |
+
# Use the official PostgreSQL image from Docker Hub
|
2 |
+
FROM phidata/pgvector:16
|
|
|
|
|
|
|
|
|
3 |
|
4 |
+
# Set environment variables
|
5 |
+
ENV POSTGRES_DB=ai
|
6 |
+
ENV POSTGRES_USER=ai
|
7 |
+
ENV POSTGRES_PASSWORD=ai
|
8 |
+
ENV PGDATA=/var/lib/postgresql/data/pgdata
|
9 |
|
10 |
+
# Expose the PostgreSQL port
|
11 |
+
EXPOSE 5432
|
12 |
+
|
13 |
+
# Use a volume for PostgreSQL data
|
14 |
+
VOLUME ["/var/lib/postgresql/data"]
|
15 |
+
|
16 |
+
# The default command to run the PostgreSQL server
|
17 |
+
CMD ["postgres"]
|