TahaRasouli commited on
Commit
53ec6bf
1 Parent(s): ab8164b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -14
Dockerfile CHANGED
@@ -1,16 +1,17 @@
1
- FROM python:3.9-slim
2
- WORKDIR /app
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
- RUN pip install -r requirements.txt
9
- # Install uvicorn
10
- RUN pip install uvicorn
 
 
11
 
12
- # Install dependencies
13
- COPY . /app
14
- ENTRYPOINT ["uvicorn", "main:app"]
15
- CMD ["--host", "0.0.0.0", "--port", "7860"]
16
- CMD ["python", "main.py" ]
 
 
 
 
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"]