postgres shadow
Build and Push Docker Images / build-and-push (push) Failing after 14s

This commit is contained in:
2025-05-21 21:06:41 +02:00
parent 4e237f1737
commit 9fff5cef23
5 changed files with 103 additions and 26 deletions
+24 -1
View File
@@ -1,8 +1,9 @@
FROM postgres:15
FROM pgvector/pgvector:pg15
# Install additional tools
RUN apt-get update && apt-get install -y \
postgresql-client \
cron \
&& rm -rf /var/lib/apt/lists/*
# Create directory for scripts
@@ -12,9 +13,31 @@ RUN mkdir -p /docker-entrypoint-initdb.d
COPY init.sh /docker-entrypoint-initdb.d/
RUN chmod +x /docker-entrypoint-initdb.d/init.sh
# Copy refresh script
COPY refresh.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/refresh.sh
# Environment variables
ENV SOURCE_DB_URL=""
ENV TARGET_DB_NAME="shadow_db"
ENV TARGET_DB_USER="postgres"
ENV TARGET_DB_PASSWORD=""
ENV REFRESH_TIME="00:00"
# Define volume for persistent data
VOLUME ["/var/lib/postgresql/data"]
# Expose PostgreSQL port
EXPOSE 5432
# Add crontab file
RUN echo "0 0 * * * /usr/local/bin/refresh.sh >> /var/log/cron.log 2>&1" > /etc/cron.d/refresh-cron
RUN chmod 0644 /etc/cron.d/refresh-cron
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
# Start cron and PostgreSQL
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]