gradio-docs-db / Dockerfile
Last commit not found
raw
history blame
574 Bytes
# 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