Spaces:
Build error
Build error
Last commit not found
# Use pgvector with Postgres 17 as the base image | |
FROM pgvector/pgvector:pg17f | |
RUN useradd -m -u 1000 postgres | |
# Set environment variable for PostgreSQL password and data directory | |
ENV POSTGRES_PASSWORD=postgres | |
ENV PGDATA=/data/postgresql | |
# Create and configure the data directories | |
RUN mkdir -p /data/postgresql && \ | |
chown -R postgres:postgres /data && \ | |
chmod 777 /data && \ | |
chmod 700 /data/postgresql | |
# Set the data directory as a volume | |
VOLUME /data | |
# Expose PostgreSQL port | |
EXPOSE 5432 | |
# Switch to postgres user for running the service | |
USER postgres | |